From bee429003b9496a7ccc61f272e433e1f1e777e5e Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Sun, 17 Oct 2021 10:25:41 +0100 Subject: [PATCH] [classifier] Added subtypes for natural=water. Signed-off-by: Viktor Govako --- data/categories.txt | 4 ++-- data/mapcss-mapping.csv | 14 +++++++------- data/strings/types_strings.txt | 4 ++-- data/styles/clear/include/Basemap.mapcss | 6 ------ data/styles/clear/include/Basemap_label.mapcss | 4 ---- data/styles/vehicle/include/Basemap.mapcss | 6 ------ data/styles/vehicle/include/Basemap_label.mapcss | 4 ---- generator/generator_tests/osm_type_test.cpp | 7 +++++-- map/style_tests/classificator_tests.cpp | 2 +- search/search_integration_tests/smoke_test.cpp | 2 +- 10 files changed, 18 insertions(+), 35 deletions(-) diff --git a/data/categories.txt b/data/categories.txt index 9a8c9cb6a5..b30bbcac42 100644 --- a/data/categories.txt +++ b/data/categories.txt @@ -5174,7 +5174,7 @@ sw:Maji fa:اب # Skipped if empty name -natural-pond +natural-water-pond en:Pond|water ru:Пруд|водоём bg:локва|вода|езеро|басейн @@ -5209,7 +5209,7 @@ sw:Bwawa fa:تالاب # Skipped if empty name -natural-lake +natural-water-lake en:Lake|water ru:Озеро|водоём bg:Езеро|вода diff --git a/data/mapcss-mapping.csv b/data/mapcss-mapping.csv index 27c7571e52..c09a24f39e 100644 --- a/data/mapcss-mapping.csv +++ b/data/mapcss-mapping.csv @@ -44,10 +44,10 @@ deprecated|deprecated;43;x highway|motorway_link;44; waterway|stream|intermittent;[waterway=stream][intermittent=yes];;name;int_name;45; highway|track|grade4;[highway=track][tracktype=grade4];;name;int_name;46; -deprecated|deprecated;47;x +natural|water|pond;[natural=water][water=pond];;name;int_name;47; landuse|farmland;48; barrier|fence;49; -deprecated|deprecated;50;x +natural|water|lake;[natural=water][water=lake];;name;int_name;50; power|pole;51; waterway|riverbank;52; highway|path|bicycle;[highway=path][bicycle?];;name;int_name;53; @@ -145,11 +145,11 @@ railway|abandoned;144; amenity|parking|private;[amenity=parking][access=private];;name;int_name;145; boundary|administrative|7;[boundary=administrative][admin_level=7];;name;int_name;146; tourism|attraction;147; -deprecated|deprecated;148;x -deprecated|deprecated;149;x +natural|water|reservoir;[natural=water][water=reservoir];;name;int_name;148; +natural|water|river;[natural=water][water=river];;name;int_name;149; railway|tram;150; amenity|toilets;151; -deprecated|deprecated;152;x +natural|water|basin;[natural=water][water=basin];;name;int_name;152; highway|footway|permissive;[highway=footway][access=permissive],[highway=footway][foot=permissive];;name;int_name;153; leisure|picnic_table;154; landuse|construction;155; @@ -561,7 +561,7 @@ deprecated|deprecated;560;x deprecated|deprecated;561;x deprecated|deprecated;562;x deprecated|deprecated;563;x -natural|lake;564; +natural|lake;564;natural|water|lake deprecated|deprecated;565;x deprecated|deprecated;566;x deprecated|deprecated;567;x @@ -573,7 +573,7 @@ deprecated|deprecated;572;x deprecated|deprecated;573;x deprecated|deprecated;574;x piste:lift|rope_tow;575; -natural|pond;576; +natural|pond;576;natural|water|pond deprecated|deprecated;577;x highway|secondary_link|tunnel;[highway=secondary_link][tunnel?];;name;int_name;578; deprecated|deprecated;579;x diff --git a/data/strings/types_strings.txt b/data/strings/types_strings.txt index bacc9294aa..846600f5a5 100644 --- a/data/strings/types_strings.txt +++ b/data/strings/types_strings.txt @@ -13146,7 +13146,7 @@ ru = Горячий источник zh-Hans = 温泉 - [type.natural.lake] + [type.natural.water.lake] en = Lake ar = بحيرة cs = Jezero @@ -13230,7 +13230,7 @@ zh-Hans = 峰 zh-Hant = 山峰 - [type.natural.pond] + [type.natural.water.pond] en = Pond ar = بركة cs = Rybník diff --git a/data/styles/clear/include/Basemap.mapcss b/data/styles/clear/include/Basemap.mapcss index aaef378fe4..4bc61570f5 100644 --- a/data/styles/clear/include/Basemap.mapcss +++ b/data/styles/clear/include/Basemap.mapcss @@ -128,8 +128,6 @@ line[waterway=ditch], line[waterway=drain], {z-index: 50;} -area[natural=lake], -area[natural=pond], area[natural=water], area[waterway=dock], area[waterway=riverbank], @@ -336,8 +334,6 @@ area|z10-[leisure=beach_resort], /* 6.WATER */ -area|z0-[natural=lake], -area|z0-[natural=pond], area|z0-[natural=water], area|z0-[landuse=salt_pond], area|z0-[waterway=dock], @@ -361,8 +357,6 @@ line|z16-[waterway=lock], /* 6.1 Area water(lake,pond etc.) */ -area|z0-[natural=lake], -area|z0-[natural=pond], area|z0-[natural=water], area|z0-[landuse=salt_pond], area|z0-[waterway=dock], diff --git a/data/styles/clear/include/Basemap_label.mapcss b/data/styles/clear/include/Basemap_label.mapcss index c60a677532..fede22b0b3 100644 --- a/data/styles/clear/include/Basemap_label.mapcss +++ b/data/styles/clear/include/Basemap_label.mapcss @@ -98,7 +98,6 @@ node[place=ocean], node[place=sea] {z-index: 3000;} -area[natural=lake], area[landuse=reservoir], area[natural=water], line[waterway=river], @@ -520,7 +519,6 @@ node|z17-[natural=beach] node|z1-[place=ocean], node|z4-[place=sea], -area|z10-[natural=lake][bbox_area>=4000000], area|z10-[landuse=reservoir][bbox_area>=4000000], area|z10-[natural=water][bbox_area>=4000000], line|z11-[waterway=river], @@ -564,11 +562,9 @@ area|z16-[natural=water], area|z16-[natural=wetland], {font-size: 11;} -area|z10-[natural=lake][bbox_area>=4000000], area|z10-[landuse=reservoir][bbox_area>=4000000], area|z10-[natural=water][bbox_area>=4000000], {font-size: 9;} -area|z10-[natural=lake][bbox_area<4000000], area|z10-[landuse=reservoir][bbox_area<4000000], area|z10-[natural=water][bbox_area<4000000], {font-size: 0;} /*check*/ diff --git a/data/styles/vehicle/include/Basemap.mapcss b/data/styles/vehicle/include/Basemap.mapcss index 0591fa8063..7556bc22fa 100644 --- a/data/styles/vehicle/include/Basemap.mapcss +++ b/data/styles/vehicle/include/Basemap.mapcss @@ -118,8 +118,6 @@ line[waterway=ditch], line[waterway=drain], {z-index: 50;} -area[natural=lake], -area[natural=pond], area[natural=water], area[waterway=dock], area[waterway=riverbank], @@ -313,8 +311,6 @@ area|z10-[leisure=beach_resort], /* 6.WATER */ -area|z0-[natural=lake], -area|z0-[natural=pond], area|z0-[natural=water], area|z0-[landuse=salt_pond], area|z0-[waterway=dock], @@ -334,8 +330,6 @@ line|z16-[waterway=lock], /* 6.1 Area water(lake,pond etc.) */ -area|z0-[natural=lake], -area|z0-[natural=pond], area|z0-[natural=water], area|z0-[landuse=salt_pond], area|z0-[waterway=dock], diff --git a/data/styles/vehicle/include/Basemap_label.mapcss b/data/styles/vehicle/include/Basemap_label.mapcss index ebe0e83f6d..c575b5c3fc 100644 --- a/data/styles/vehicle/include/Basemap_label.mapcss +++ b/data/styles/vehicle/include/Basemap_label.mapcss @@ -95,7 +95,6 @@ node[place=ocean], node[place=sea] {z-index: 3000;} -area[natural=lake], area[landuse=reservoir], area[natural=water], line[waterway=river], @@ -473,7 +472,6 @@ node|z17-[natural=beach] node|z1-[place=ocean], node|z4-[place=sea], -area|z10-[natural=lake][bbox_area>=4000000], area|z10-[landuse=reservoir][bbox_area>=4000000], area|z10-[natural=water][bbox_area>=80000000], line|z11-[waterway=river], @@ -517,11 +515,9 @@ area|z16-[natural=water], area|z16-[natural=wetland], {font-size: 10.5;} -area|z10-[natural=lake][bbox_area>=4000000], area|z10-[landuse=reservoir][bbox_area>=4000000], area|z10-[natural=water][bbox_area>=4000000], {font-size: 8.5;} -area|z10-[natural=lake][bbox_area<4000000], area|z10-[landuse=reservoir][bbox_area<4000000], area|z10-[natural=water][bbox_area<4000000], {font-size: 0;} /*check*/ diff --git a/generator/generator_tests/osm_type_test.cpp b/generator/generator_tests/osm_type_test.cpp index fdb806297a..9b411c307e 100644 --- a/generator/generator_tests/osm_type_test.cpp +++ b/generator/generator_tests/osm_type_test.cpp @@ -1669,10 +1669,8 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_SimpleTypesSmoke) {"natural", "grassland"}, {"natural", "heath"}, {"natural", "hot_spring"}, - {"natural", "lake"}, {"natural", "land"}, {"natural", "peak"}, - {"natural", "pond"}, {"natural", "rock"}, {"natural", "scrub"}, {"natural", "spring"}, @@ -2088,6 +2086,11 @@ UNIT_CLASS_TEST(TestWithClassificator, OsmType_ComplexTypesSmoke) {{"leisure", "park", "private"}, {{"leisure", "park"}, {"access", "private"}}}, {{"leisure", "sports_centre", "climbing"}, {{"leisure", "sports_centre"}, {"sport", "climbing"}}}, {{"leisure", "sports_centre", "yoga"}, {{"leisure", "sports_centre"}, {"sport", "yoga"}}}, + {{"natural", "water", "pond"}, {{"natural", "water"}, {"water", "pond"}}}, + {{"natural", "water", "lake"}, {{"natural", "water"}, {"water", "lake"}}}, + {{"natural", "water", "reservoir"}, {{"natural", "water"}, {"water", "reservoir"}}}, + {{"natural", "water", "river"}, {{"natural", "water"}, {"water", "river"}}}, + {{"natural", "water", "basin"}, {{"natural", "water"}, {"water", "basin"}}}, {{"natural", "wetland", "bog"}, {{"natural", "wetland"}, {"wetland", "bog"}}}, {{"natural", "wetland", "marsh"}, {{"natural", "wetland"}, {"wetland", "marsh"}}}, {{"office"}, {{"office", "any_value"}}}, diff --git a/map/style_tests/classificator_tests.cpp b/map/style_tests/classificator_tests.cpp index aca937a816..530aed8e8f 100644 --- a/map/style_tests/classificator_tests.cpp +++ b/map/style_tests/classificator_tests.cpp @@ -250,7 +250,7 @@ UNIT_TEST(Classificator_AreaPriority) // ? //{"leisure", "park"}, {"leisure", "garden"}, - maybe next time (too tricky to do it now) // 3 - {"natural", "water"}, {"natural", "lake"}, {"landuse", "basin"}, {"waterway", "riverbank"} + {"natural", "water"}, {"natural", "water", "lake"}, {"landuse", "basin"}, {"waterway", "riverbank"} }, {1, 2, 7, 4}, drule::area); } diff --git a/search/search_integration_tests/smoke_test.cpp b/search/search_integration_tests/smoke_test.cpp index e8e8a5c2ef..11743e8f90 100644 --- a/search/search_integration_tests/smoke_test.cpp +++ b/search/search_integration_tests/smoke_test.cpp @@ -183,7 +183,7 @@ UNIT_CLASS_TEST(SmokeTest, CategoriesTest) {"man_made", "water_tower"}, {"man_made", "water_well"}, {"natural", "glacier"}, - {"natural", "pond"}, + {"natural", "water", "pond"}, {"natural", "tree"}}; set invisibleTypes; for (auto const & tags : invisibleAsPointTags)