Skip to content

Commit

Permalink
Merge pull request #1461 from pnorman/1425_wetland
Browse files Browse the repository at this point in the history
Add wetland detail to kind_detail
  • Loading branch information
pnorman authored Dec 23, 2017
2 parents fcdbee2 + 688d852 commit f11700f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ _TIP: Some `landuse` features only exist as point features in OpenStreetMap. Fin
* `works`
* `zoo`

##### Wetland `kind_detail` values:

The value of the OpenStreetMap `wetland` tag. Common values are `bog`, `fen`, `mangrove`, `marsh`, `reedbed`, `saltmarsh`, `string_bog`, `swamp`, `tidalflat`, and `wet_meadow`.

## Places

Expand Down
13 changes: 13 additions & 0 deletions integration-test/1425-osm-features.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ def test_shops(self):
'http://www.openstreetmap.org/node/2299770718',
'16/19297/24633', {'kind': 'variety_store'})

def test_wetland(self):
self._run_test(
'http://www.openstreetmap.org/way/412807883',
'16/19327/24638', 'landuse', {'kind': 'wetland'})
self._run_test(
'http://www.openstreetmap.org/way/396249564',
'16/19310/24621', 'landuse',
{'kind': 'wetland', 'kind_detail': 'saltmarsh'})
self._run_test(
'http://www.openstreetmap.org/way/257640900',
'16/19318/24656', 'landuse',
{'kind': 'wetland', 'kind_detail': 'tidalflat'})

def _run_test(self, url, zxy, layer, props):
z, x, y = map(int, zxy.split('/'))
self.load_fixtures([url])
Expand Down
1 change: 1 addition & 0 deletions yaml/landuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ filters:
output:
<<: *output_properties
kind: wetland
kind_detail: {col: wetland}
- filter: {natural: park}
min_zoom: { clamp: { max: 16, min: 9, value: { col: zoom } } }
output:
Expand Down

0 comments on commit f11700f

Please sign in to comment.