From 929a71f6dacde872d112368af1d6d2337ed4a43c Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Mon, 30 Sep 2019 12:38:44 +0200 Subject: [PATCH 1/8] Add fell --- queries.yaml | 1 + spreadsheets/collision_rank.yaml | 1 + tilejson/tilejson.json.erb | 2 +- yaml/landuse.yaml | 5 +++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/queries.yaml b/queries.yaml index f25324d9c..581028565 100644 --- a/queries.yaml +++ b/queries.yaml @@ -373,6 +373,7 @@ post_process: scree: barren shingle: barren stone: barren + fell: barren # desert bare_rock: desert diff --git a/spreadsheets/collision_rank.yaml b/spreadsheets/collision_rank.yaml index 7c93ddcfd..f76e35d5e 100644 --- a/spreadsheets/collision_rank.yaml +++ b/spreadsheets/collision_rank.yaml @@ -965,6 +965,7 @@ - {$layer: 'water', kind: 'fountain'} - {$layer: 'water', kind: 'ditch'} - {$layer: 'water', kind: 'drain'} +- {$layer: 'water', kind: 'weir'} - {$layer: 'water', kind: 'swimming_pool'} - {$layer: 'landuse', kind: 'breakwater'} - {$layer: 'landuse', kind: 'cutline'} diff --git a/tilejson/tilejson.json.erb b/tilejson/tilejson.json.erb index 00df88c93..4ac69f6db 100644 --- a/tilejson/tilejson.json.erb +++ b/tilejson/tilejson.json.erb @@ -100,7 +100,7 @@ "name" : "String. Localized name variants are in properties like 'name:en'. Common value.", "id" : "Integer. Common value.", "source" : "String. Common value, one of: openstreetmap.org, naturalearthdata.com.", - "kind" : "String. Common value, one of: aerodrome, airfield, allotments, amusement_ride, animal, apron, aquarium, artwork, attraction, aviary, bare_rock, barren, battlefield, beach, boatyard, breakwater, bridge, camp_site, caravan_site, carousel, cemetery, cinema, city_wall, college, commercial, common, container_terminal, crane, cutline, cutting, dam, danger_area, desert, dike, ditch, dog_park, embankment, enclosure, farm, farmland, farmyard, fence, fence, ferry_terminal, footway, forest, fort, fuel, garden, gate, generator, glacier, golf_course, grass, grassland, groyne, guard_rail, hanami, harbour, heath, hospital, industrial, kerb, land, library, maze, meadow, military, mud, national_park, nature_reserve, naval_base, orchard, park, parking, pedestrian, petting_zoo, picnic_site, pier, pier, pitch, place_of_worship, plant, plant_nursery, playground, port, port_terminal, power_line, power_minor_line, prison, protected_area, quarry, quay, railway, range, recreation_ground, recreation_track, residential, resort, rest_area, retail, retaining_wall, rock, roller_coaster, runway, rural, sand, school, scree, scrub, service_area, shingle, shipyard, snow_fence, sports_centre, stadium, stone, substation, summer_toboggan, taxiway, theatre, theme_park, tower, trail_riding_station, university, urban, urban_area, village_green, vineyard, wall, wastewater_plant, water_park, water_slide, water_works, wetland, wharf, wilderness_hut, wildlife_park, winery, winter_sports, wood, works, zoo, low_emission_zone.", + "kind" : "String. Common value, one of: aerodrome, airfield, allotments, amusement_ride, animal, apron, aquarium, artwork, attraction, aviary, bare_rock, barren, battlefield, beach, boatyard, breakwater, bridge, camp_site, caravan_site, carousel, cemetery, cinema, city_wall, college, commercial, common, container_terminal, crane, cutline, cutting, dam, danger_area, desert, dike, ditch, dog_park, embankment, enclosure, farm, farmland, farmyard, fence, fence, ferry_terminal, footway, forest, fort, fuel, garden, gate, generator, glacier, golf_course, grass, grassland, groyne, guard_rail, hanami, harbour, heath, hospital, industrial, kerb, land, library, maze, meadow, military, mud, national_park, nature_reserve, naval_base, orchard, park, parking, pedestrian, petting_zoo, picnic_site, pier, pier, pitch, place_of_worship, plant, plant_nursery, playground, port, port_terminal, power_line, power_minor_line, prison, protected_area, quarry, quay, railway, range, recreation_ground, recreation_track, residential, resort, rest_area, retail, retaining_wall, rock, roller_coaster, runway, rural, sand, school, scree, scrub, service_area, shingle, fell, shipyard, snow_fence, sports_centre, stadium, stone, substation, summer_toboggan, taxiway, theatre, theme_park, tower, trail_riding_station, university, urban, urban_area, village_green, vineyard, wall, wastewater_plant, water_park, water_slide, water_works, wetland, wharf, wilderness_hut, wildlife_park, winery, winter_sports, wood, works, zoo, low_emission_zone.", "kind_detail" : "String. Common optional value.", "min_zoom" : "Number. A suggested minimum zoom at which the features should become visible. Common value.", "sort_rank" : "Integer. Suggestion for which order to draw features (lower values are bottom, bigger values on top). Common value.", diff --git a/yaml/landuse.yaml b/yaml/landuse.yaml index 6c2ad2586..18ec9b924 100644 --- a/yaml/landuse.yaml +++ b/yaml/landuse.yaml @@ -1165,6 +1165,11 @@ filters: output: <<: *output_properties kind: {col: natural} + - filter: {natural: fell} + min_zoom: { clamp: { max: 16, min: 9, value: { col: zoom } } } + output: + <<: *output_properties + kind: fell - filter: {landuse: vineyard} min_zoom: { clamp: { max: 16, min: 9, value: { col: zoom } } } output: From 96b959fa11d92eb5d11ef756c5d728dec44ff66f Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Mon, 30 Sep 2019 12:41:23 +0200 Subject: [PATCH 2/8] Remove typo --- spreadsheets/collision_rank.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/spreadsheets/collision_rank.yaml b/spreadsheets/collision_rank.yaml index f76e35d5e..7c93ddcfd 100644 --- a/spreadsheets/collision_rank.yaml +++ b/spreadsheets/collision_rank.yaml @@ -965,7 +965,6 @@ - {$layer: 'water', kind: 'fountain'} - {$layer: 'water', kind: 'ditch'} - {$layer: 'water', kind: 'drain'} -- {$layer: 'water', kind: 'weir'} - {$layer: 'water', kind: 'swimming_pool'} - {$layer: 'landuse', kind: 'breakwater'} - {$layer: 'landuse', kind: 'cutline'} From 65981a80ab792891fd9730259ae14851124d3891 Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Wed, 9 Oct 2019 12:36:23 +0200 Subject: [PATCH 3/8] Add fell into collision and sort ranks --- spreadsheets/collision_rank.yaml | 1 + spreadsheets/sort_rank/landuse.csv | 223 +++++++++++++++-------------- 2 files changed, 113 insertions(+), 111 deletions(-) diff --git a/spreadsheets/collision_rank.yaml b/spreadsheets/collision_rank.yaml index 7c93ddcfd..692c7d80d 100644 --- a/spreadsheets/collision_rank.yaml +++ b/spreadsheets/collision_rank.yaml @@ -599,6 +599,7 @@ - {$layer: 'landuse', kind: 'natural_wood'} # reserve for kind_details - _reserved: {count: 10} +- {$layer: 'landuse', kind: 'fell'} - {$layer: 'landuse', kind: 'grass'} - {$layer: 'landuse', kind: 'meadow'} - {$layer: 'landuse', kind: 'scrub'} diff --git a/spreadsheets/sort_rank/landuse.csv b/spreadsheets/sort_rank/landuse.csv index 02f76a49a..855eddfdf 100644 --- a/spreadsheets/sort_rank/landuse.csv +++ b/spreadsheets/sort_rank/landuse.csv @@ -1,115 +1,116 @@ kind,geometrytype,sort_rank -power_line,*,274 -power_minor_line,*,273 -crane,*,272 -city_wall,*,271 -wall,*,270 -fence,*,269 -embankment,*,278 -snow_fence,*,267 -retaining_wall,*,266 -dam,LineString;MultiLineString,265 -tree_row,*,264 -hedge,*,263 -bridge,*,229 -pier,*,228 -dike,*,227 -cutline,*,226 -groyne,*,225 -breakwater,*,224 -dam,*,223 -land,*,222 -wetland,*,220 -mud,*,219 -footway,*,126 -tower,*,125 -wilderness_hut,*,124 -parking,*,123 -picnic_site,*,122 -water_park,*,121 -amusement_ride,*,120 -water_slide,*,119 -carousel,*,118 -attraction,*,117 -artwork,*,116 -animal,*,115 -pitch,*,114 -playground,*,113 -pedestrian,*,112 -dog_park,*,111 -garden,*,110 -beach,*,109 -hanami,*,108 -maze,*,107 -camp_site,*,106 -generator,*,105 -allotments,*,104 -plant,*,103 -summer_toboggan,*,102 -roller_coaster,*,101 -enclosure,*,100 -petting_zoo,*,99 -aviary,*,98 -theatre,*,97 -library,*,96 -cinema,*,95 -fuel,*,94 -school,*,93 -cemetery,*,92 -place_of_worship,*,91 -quarry,*,90 -railway,*,89 -farmyard,*,88 -substation,*,87 -works,*,86 -water_works,*,85 -wastewater_plant,*,84 -common,*,83 -village_green,*,82 -sports_centre,*,81 -stadium,*,80 -runway,*,79 -apron,*,78 -taxiway,*,77 -aerodrome,*,74 -airfield,*,73 -recreation_track,*,72 -caravan_site,*,71 -recreation_ground,*,70 -quay,*,69 -wharf,*,68 -port_terminal,*,67 -ferry_terminal,*,66 -container_terminal,*,65 -shipyard,*,64 -boatyard,*,63 -golf_course,*,62 -aquarium,*,61 -hospital,*,60 -trail_riding_station,*,59 -resort,*,58 -zoo,*,57 -winery,*,56 -wildlife_park,*,55 -theme_park,*,54 -fort,*,53 -prison,*,52 -range,*,51 -danger_area,*,50 -naval_base,*,49 -military,*,48 -retail,*,47 -commercial,*,46 -service_area,*,45 -rest_area,*,44 -college,*,43 -university,*,42 -farmland,*,41 -farm,*,40 -winter_sports,*,39 -scrub,*,37 -meadow,*,36 -grass,*,35 +power_line,*,275 +power_minor_line,*,274 +crane,*,273 +city_wall,*,272 +wall,*,271 +fence,*,270 +embankment,*,279 +snow_fence,*,268 +retaining_wall,*,267 +dam,LineString;MultiLineString,266 +tree_row,*,265 +hedge,*,264 +bridge,*,230 +pier,*,229 +dike,*,228 +cutline,*,227 +groyne,*,226 +breakwater,*,225 +dam,*,224 +land,*,223 +wetland,*,221 +mud,*,220 +footway,*,127 +tower,*,126 +wilderness_hut,*,125 +parking,*,124 +picnic_site,*,123 +water_park,*,122 +amusement_ride,*,121 +water_slide,*,120 +carousel,*,119 +attraction,*,118 +artwork,*,117 +animal,*,116 +pitch,*,115 +playground,*,114 +pedestrian,*,113 +dog_park,*,112 +garden,*,111 +beach,*,110 +hanami,*,109 +maze,*,108 +camp_site,*,107 +generator,*,106 +allotments,*,105 +plant,*,104 +summer_toboggan,*,103 +roller_coaster,*,102 +enclosure,*,101 +petting_zoo,*,100 +aviary,*,99 +theatre,*,98 +library,*,97 +cinema,*,96 +fuel,*,95 +school,*,94 +cemetery,*,93 +place_of_worship,*,92 +quarry,*,91 +railway,*,90 +farmyard,*,89 +substation,*,88 +works,*,87 +water_works,*,86 +wastewater_plant,*,85 +common,*,84 +village_green,*,83 +sports_centre,*,82 +stadium,*,81 +runway,*,80 +apron,*,79 +taxiway,*,78 +aerodrome,*,75 +airfield,*,74 +recreation_track,*,73 +caravan_site,*,72 +recreation_ground,*,71 +quay,*,70 +wharf,*,69 +port_terminal,*,68 +ferry_terminal,*,67 +container_terminal,*,66 +shipyard,*,65 +boatyard,*,64 +golf_course,*,63 +aquarium,*,62 +hospital,*,61 +trail_riding_station,*,60 +resort,*,59 +zoo,*,58 +winery,*,57 +wildlife_park,*,56 +theme_park,*,55 +fort,*,54 +prison,*,53 +range,*,52 +danger_area,*,51 +naval_base,*,50 +military,*,49 +retail,*,48 +commercial,*,47 +service_area,*,46 +rest_area,*,45 +college,*,44 +university,*,43 +farmland,*,42 +farm,*,41 +winter_sports,*,40 +scrub,*,38 +meadow,*,37 +grass,*,36 +fell,*,35 natural_wood,*,34 natural_forest,*,33 natural_park,*,32 From 0c4ef2bce7f968c6deadd283c9212e06770568f8 Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Wed, 9 Oct 2019 12:43:08 +0200 Subject: [PATCH 4/8] Update tests --- integration-test/1096-natural-landuse-sort-key.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/integration-test/1096-natural-landuse-sort-key.py b/integration-test/1096-natural-landuse-sort-key.py index bc0d73620..081c070eb 100644 --- a/integration-test/1096-natural-landuse-sort-key.py +++ b/integration-test/1096-natural-landuse-sort-key.py @@ -34,14 +34,17 @@ def test_natural_forest(self): def test_natural_park(self): self._check({'natural': 'park'}, 'natural_park', 32) + def test_fell(self): + self._check({'landuse': 'fell'}, 'fell', 35) + def test_grass(self): - self._check({'landuse': 'grass'}, 'grass', 35) + self._check({'landuse': 'grass'}, 'grass', 36) def test_meadow(self): - self._check({'landuse': 'meadow'}, 'meadow', 36) + self._check({'landuse': 'meadow'}, 'meadow', 37) def test_scrub(self): - self._check({'natural': 'scrub'}, 'scrub', 37) + self._check({'natural': 'scrub'}, 'scrub', 38) def test_wetland(self): self._check({'natural': 'wetland'}, 'wetland', 220) From fe6644cffe8d42455c74ac468900052ca49a66c7 Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Wed, 9 Oct 2019 12:59:05 +0200 Subject: [PATCH 5/8] Add test for fell --- integration-test/473-landuse-tier.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/integration-test/473-landuse-tier.py b/integration-test/473-landuse-tier.py index 50f4a9ba2..59a26bd95 100644 --- a/integration-test/473-landuse-tier.py +++ b/integration-test/473-landuse-tier.py @@ -96,3 +96,15 @@ def test_national_forest(self): 9, 142, 196, 'pois', {'kind': 'forest', 'id': 34416231, 'tier': 2, 'min_zoom': 8}) + + def test_fell(self): + import dsl + + z, x, y = (16, 35072, 18481) + + self.load_fixtures(['https://www.openstreetmap.org/way/711062546']) + + self.assert_has_feature( + z, x, y, 'landuse', + {'kind': 'fell', 'area': 'yes', 'name': 'Fulufjellet', 'wikidata': 'Q34852081'}) + From b6b4f7974adfc58718ea4adf7fa1ed1aec64c4ed Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Wed, 9 Oct 2019 13:02:08 +0200 Subject: [PATCH 6/8] Fix test --- integration-test/473-landuse-tier.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/integration-test/473-landuse-tier.py b/integration-test/473-landuse-tier.py index 59a26bd95..8599a0126 100644 --- a/integration-test/473-landuse-tier.py +++ b/integration-test/473-landuse-tier.py @@ -98,13 +98,12 @@ def test_national_forest(self): 'tier': 2, 'min_zoom': 8}) def test_fell(self): - import dsl - z, x, y = (16, 35072, 18481) self.load_fixtures(['https://www.openstreetmap.org/way/711062546']) self.assert_has_feature( z, x, y, 'landuse', - {'kind': 'fell', 'area': 'yes', 'name': 'Fulufjellet', 'wikidata': 'Q34852081'}) + {'kind': 'fell', 'area': 'yes', + 'name': 'Fulufjellet', 'wikidata': 'Q34852081'}) From e7349aa959491f9b5caf07045577903ad1b0b01a Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Wed, 9 Oct 2019 13:12:15 +0200 Subject: [PATCH 7/8] Fix blank line in test --- integration-test/473-landuse-tier.py | 1 - 1 file changed, 1 deletion(-) diff --git a/integration-test/473-landuse-tier.py b/integration-test/473-landuse-tier.py index 8599a0126..5bc7656fb 100644 --- a/integration-test/473-landuse-tier.py +++ b/integration-test/473-landuse-tier.py @@ -106,4 +106,3 @@ def test_fell(self): z, x, y, 'landuse', {'kind': 'fell', 'area': 'yes', 'name': 'Fulufjellet', 'wikidata': 'Q34852081'}) - From 5045af5252fd218ea2acda49586e15cab657127f Mon Sep 17 00:00:00 2001 From: Tomas Vajda Date: Wed, 9 Oct 2019 13:26:57 +0200 Subject: [PATCH 8/8] Fix trailing whitespace --- integration-test/473-landuse-tier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/473-landuse-tier.py b/integration-test/473-landuse-tier.py index 5bc7656fb..b82531a51 100644 --- a/integration-test/473-landuse-tier.py +++ b/integration-test/473-landuse-tier.py @@ -104,5 +104,5 @@ def test_fell(self): self.assert_has_feature( z, x, y, 'landuse', - {'kind': 'fell', 'area': 'yes', + {'kind': 'fell', 'area': 'yes', 'name': 'Fulufjellet', 'wikidata': 'Q34852081'})