Simplify some of the OSM->OMT field value mappings using declarative syntax. This approach is not for all cases, but in many it removes the need of storing the same field in both the .yaml and .sql files. TODO: support more complex AND/OR cases
41 lines
1.7 KiB
YAML
41 lines
1.7 KiB
YAML
layer:
|
|
id: "water"
|
|
description: |
|
|
Water polygons representing oceans and lakes. Covered watered areas are excluded (`covered=yes`).
|
|
On low zoom levels all water originates from Natural Earth. To get a more correct display of the south pole you should also
|
|
style the covering ice shelves over the water.
|
|
On higher zoom levels water polygons from [OpenStreetMapData](http://osmdata.openstreetmap.de/) are used.
|
|
The polygons are split into many smaller polygons to improve rendering performance.
|
|
This however can lead to less rendering options in clients since these boundaries show up. So you might not be
|
|
able to use border styling for ocean water features.
|
|
fields:
|
|
class:
|
|
description: |
|
|
All water polygons from [OpenStreetMapData](http://osmdata.openstreetmap.de/) have the class `ocean`.
|
|
Water bodies are classified as `lake` or `river` for water bodies with the [`waterway`](http://wiki.openstreetmap.org/wiki/Key:waterway) tag.
|
|
values:
|
|
lake:
|
|
waterway: ['', 'lake']
|
|
dock:
|
|
waterway: 'dock'
|
|
river:
|
|
ocean:
|
|
intermittent:
|
|
description: |
|
|
Mark with `1` if it is an [intermittent](http://wiki.openstreetmap.org/wiki/Key:intermittent) water polygon.
|
|
values: [0, 1]
|
|
brunnel:
|
|
description: |
|
|
Identifies the type of crossing as either a bridge or a tunnel.
|
|
values:
|
|
- bridge
|
|
- tunnel
|
|
buffer_size: 4
|
|
datasource:
|
|
query: (SELECT geometry, class, intermittent, brunnel FROM layer_water(!bbox!, z(!scale_denominator!))) AS t
|
|
schema:
|
|
- ./water.sql
|
|
datasources:
|
|
- type: imposm3
|
|
mapping_file: ./mapping.yaml
|