Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fell kind to landuse #1932

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions integration-test/1096-natural-landuse-sort-key.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 10 additions & 0 deletions integration-test/473-landuse-tier.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,13 @@ def test_national_forest(self):
9, 142, 196, 'pois',
{'kind': 'forest', 'id': 34416231,
'tier': 2, 'min_zoom': 8})

def test_fell(self):
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'})
1 change: 1 addition & 0 deletions queries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ post_process:
scree: barren
shingle: barren
stone: barren
fell: barren
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, thanks for taking care of the remapping!


# desert
bare_rock: desert
Expand Down
1 change: 1 addition & 0 deletions spreadsheets/collision_rank.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down
223 changes: 112 additions & 111 deletions spreadsheets/sort_rank/landuse.csv
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

@nvkelso nvkelso Mar 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mud, wetland, land and above don't need to increment their numbers, as there is a discontinuity buffer between mud and footway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, should I remove dam, land, wetland and mud? Will they sort properly when they will be removed from this list?

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
Expand Down
2 changes: 1 addition & 1 deletion tilejson/tilejson.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
5 changes: 5 additions & 0 deletions yaml/landuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down