diff --git a/data/drules_proto.bin b/data/drules_proto.bin index b5f40b8627..fa470986a0 100644 Binary files a/data/drules_proto.bin and b/data/drules_proto.bin differ diff --git a/data/drules_proto.txt b/data/drules_proto.txt index 41b6e86ccb..d9957b1acc 100644 --- a/data/drules_proto.txt +++ b/data/drules_proto.txt @@ -60694,6 +60694,36 @@ cont { } cont { name: "railway-rail-highspeed" + element { + scale: 7 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60822,6 +60852,36 @@ cont { } cont { name: "railway-rail-highspeed-bridge" + element { + scale: 7 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -61016,6 +61076,36 @@ cont { } cont { name: "railway-rail-highspeed-tunnel" + element { + scale: 7 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -61204,6 +61294,26 @@ cont { } cont { name: "railway-rail-main" + element { + scale: 8 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -61332,6 +61442,26 @@ cont { } cont { name: "railway-rail-main-bridge" + element { + scale: 8 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -61526,6 +61656,26 @@ cont { } cont { name: "railway-rail-main-tunnel" + element { + scale: 8 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { diff --git a/data/drules_proto_clear.bin b/data/drules_proto_clear.bin index a0f89e06ee..98babd6c0e 100644 Binary files a/data/drules_proto_clear.bin and b/data/drules_proto_clear.bin differ diff --git a/data/drules_proto_clear.txt b/data/drules_proto_clear.txt index fe0249e1bd..f3ea8cbca4 100644 --- a/data/drules_proto_clear.txt +++ b/data/drules_proto_clear.txt @@ -60155,6 +60155,36 @@ cont { } cont { name: "railway-rail-highspeed" + element { + scale: 7 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60283,6 +60313,36 @@ cont { } cont { name: "railway-rail-highspeed-bridge" + element { + scale: 7 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60477,6 +60537,36 @@ cont { } cont { name: "railway-rail-highspeed-tunnel" + element { + scale: 7 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60665,6 +60755,26 @@ cont { } cont { name: "railway-rail-main" + element { + scale: 8 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60793,6 +60903,26 @@ cont { } cont { name: "railway-rail-main-bridge" + element { + scale: 8 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60987,6 +61117,26 @@ cont { } cont { name: "railway-rail-main-tunnel" + element { + scale: 8 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 9868678 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { diff --git a/data/drules_proto_dark.bin b/data/drules_proto_dark.bin index a9a2e37ca7..f746d38822 100644 Binary files a/data/drules_proto_dark.bin and b/data/drules_proto_dark.bin differ diff --git a/data/drules_proto_dark.txt b/data/drules_proto_dark.txt index da828458e6..9679a2d85f 100644 --- a/data/drules_proto_dark.txt +++ b/data/drules_proto_dark.txt @@ -60240,6 +60240,36 @@ cont { } cont { name: "railway-rail-highspeed" + element { + scale: 7 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60368,6 +60398,36 @@ cont { } cont { name: "railway-rail-highspeed-bridge" + element { + scale: 7 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60562,6 +60622,36 @@ cont { } cont { name: "railway-rail-highspeed-tunnel" + element { + scale: 7 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 8 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.2 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60750,6 +60840,26 @@ cont { } cont { name: "railway-rail-main" + element { + scale: 8 + lines { + width: 1.0 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -60878,6 +60988,26 @@ cont { } cont { name: "railway-rail-main-bridge" + element { + scale: 8 + lines { + width: 1.0 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { @@ -61072,6 +61202,26 @@ cont { } cont { name: "railway-rail-main-tunnel" + element { + scale: 8 + lines { + width: 1.0 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } + element { + scale: 9 + lines { + width: 1.0 + color: 4470602 + priority: 411 + join: BEVELJOIN + cap: BUTTCAP + } + } element { scale: 10 lines { diff --git a/data/styles/clear/include/Roads.mapcss b/data/styles/clear/include/Roads.mapcss index c84e0ea9f6..ce9cc58d52 100644 --- a/data/styles/clear/include/Roads.mapcss +++ b/data/styles/clear/include/Roads.mapcss @@ -1102,8 +1102,8 @@ line|z16-[railway=rail]::dash, {color: @railway_dash; opacity:1;} -line|z10-[railway=rail][highspeed?], -line|z10-[railway=rail][usage=main], +line|z7-[railway=rail][highspeed?], +line|z8-[railway=rail][usage=main], line|z11-[railway=rail][usage=branch], {color: @railway; opacity: 1;} line|z10-[railway=rail][usage=tourism], @@ -1191,7 +1191,7 @@ line|z16[railway=rail][service=service]::dash, {width: 0;} -line|z10-11[railway=rail][usage=main], +line|z8-11[railway=rail][usage=main], line|z10-11[railway=rail][usage=tourism], line|z11[railway=rail][usage=branch], line|z13[railway=rail][usage=utility], @@ -1201,7 +1201,7 @@ line|z12[railway=rail][usage=tourism], line|z12[railway=rail][usage=branch], line|z14[railway=rail][usage=utility], {width: 1.1;} -line|z10[railway=rail][highspeed?], +line|z7-10[railway=rail][highspeed?], line|z13[railway=rail][usage=main], line|z13[railway=rail][usage=tourism], line|z13[railway=rail][usage=branch], diff --git a/generator/feature_merger.hpp b/generator/feature_merger.hpp index a7d65f33f1..a465524a24 100644 --- a/generator/feature_merger.hpp +++ b/generator/feature_merger.hpp @@ -95,6 +95,9 @@ class FeatureTypesProcessor static uint32_t GetType(char const * arr[], size_t n); + // Truncates the types to leave first two parts only (e.g. highway-motorway), + // unless the type is added into exceptions. + // Then optionally maps into a different type if a mapping was set before. void CorrectType(uint32_t & t) const; class do_change_types diff --git a/generator/world_map_generator.hpp b/generator/world_map_generator.hpp index c7ad602a55..63d313308f 100644 --- a/generator/world_map_generator.hpp +++ b/generator/world_map_generator.hpp @@ -100,17 +100,23 @@ public: , m_boundaryChecker(rawGeometryFileName) , m_popularPlacesFilename(popularPlacesFilename) { - // Do not strip last types for given tags, + // By default all line types are truncated to 2 parts only. + // Do not strip last parts for given types, // for example, do not cut 'admin_level' in 'boundary-administrative-XXX'. char const * arr1[][3] = {{"boundary", "administrative", "2"}, {"boundary", "administrative", "3"}, - {"boundary", "administrative", "4"}}; - + {"boundary", "administrative", "4"}, + {"railway", "rail", "highspeed"}, + {"railway", "rail", "main"}}; for (size_t i = 0; i < ARRAY_SIZE(arr1); ++i) m_typesCorrector.SetDontNormalizeType(arr1[i]); - char const * arr2[] = {"boundary", "administrative", "4", "state"}; - m_typesCorrector.SetDontNormalizeType(arr2); + char const * arr2[][4] = {{"railway", "rail", "highspeed", "bridge"}, + {"railway", "rail", "highspeed", "tunnel"}, + {"railway", "rail", "main", "bridge"}, + {"railway", "rail", "main", "tunnel"}}; + for (size_t i = 0; i < ARRAY_SIZE(arr2); ++i) + m_typesCorrector.SetDontNormalizeType(arr2[i]); if (popularPlacesFilename.empty()) LOG(LWARNING, ("popular_places_data option not set. Popular atractions will not be added to World.mwm"));