Document water and remove obsolete mapping

This commit is contained in:
lukasmartinelli 2016-10-28 20:49:20 +02:00
parent ff52cfda08
commit 90f2203e7c
5 changed files with 31 additions and 24 deletions

View File

@ -1,4 +1,4 @@
all: build/openmaptiles.tm2source/data.yml build/mapping.yaml build/tileset.sql layers/railway/README.md layers/boundary/README.md all: build/openmaptiles.tm2source/data.yml build/mapping.yaml build/tileset.sql layers/railway/README.md layers/boundary/README.md layers/water/README.md
build/openmaptiles.tm2source/data.yml: build/openmaptiles.tm2source/data.yml:
mkdir -p build/openmaptiles.tm2source && generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="openmaptiles" --password="openmaptiles" > build/openmaptiles.tm2source/data.yml mkdir -p build/openmaptiles.tm2source && generate-tm2source openmaptiles.yaml --host="postgres" --port=5432 --database="openmaptiles" --user="openmaptiles" --password="openmaptiles" > build/openmaptiles.tm2source/data.yml
@ -15,5 +15,8 @@ layers/railway/README.md:
layers/boundary/README.md: layers/boundary/README.md:
generate-doc layers/boundary/boundary.yaml --diagram layers/boundary/mapping > layers/boundary/README.md generate-doc layers/boundary/boundary.yaml --diagram layers/boundary/mapping > layers/boundary/README.md
layers/water/README.md:
generate-doc layers/water/water.yaml --diagram layers/water/mapping > layers/water/README.md
clean: clean:
rm -f build/openmaptiles.tm2source/data.yml && rm -f build/mapping.yaml && rm -f build/tileset.sql && rm -f layers/**/README.md&& rm -f layers/**/*.png rm -f build/openmaptiles.tm2source/data.yml && rm -f build/mapping.yaml && rm -f build/tileset.sql && rm -f layers/**/README.md&& rm -f layers/**/*.png

18
layers/water/README.md Normal file
View File

@ -0,0 +1,18 @@
# water
Water polygons representing oceans and lakes. Covered watered areas are excluded (`covered=yes`).
Until z6 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.
Water from OpenStreetMap after z7 is 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**: Either `ocean`, `lake` or `river`.
## Mapping
![](mapping.png)

BIN
layers/water/mapping.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -52,25 +52,3 @@ tables:
- drain - drain
- ditch - ditch
type: polygon type: polygon
water_linestring:
fields:
- name: osm_id
type: id
- name: geometry
type: geometry
- name: waterway
type: mapping_value
- key: name
name: name
type: string
- name: name_en
key: name:en
type: string
mapping:
waterway:
- stream
- river
- canal
- drain
- ditch
type: linestring

View File

@ -1,7 +1,15 @@
layer: layer:
id: "water" id: "water"
description: | description: |
Water polygons and linestrings representing oceans, lakes. Water polygons representing oceans and lakes. Covered watered areas are excluded (`covered=yes`).
Until z6 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.
Water from OpenStreetMap after z7 is 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: |
Either `ocean`, `lake` or `river`.
buffer_size: 4 buffer_size: 4
datasource: datasource:
query: (SELECT geom, class FROM layer_water(!bbox!, z(!scale_denominator!))) AS t query: (SELECT geom, class FROM layer_water(!bbox!, z(!scale_denominator!))) AS t