Add OSM ID to the lakes (#1383)

This PR adding OSM ID to the lakes

OSM lakes are used from zoom 6
From zoom 0 to zoom 5 are used Natural Earth lakes. 
  - There is a new joining mat. view (`match_osm_ne_id`) contains which Natural Earth ID should convert to OSM ID. This logic is used to keep a consistent ID between switching between NE (zooms 0 - 5) and OSM (zooms 6 - 12). For smaller areas (not the whole planet), where are not available OSM lakes, the NE lakes keep their NE ID.
  - There are also switch the final views to the mat. views - this should slightly increase performance (get rid of multipolygons).
  - FIX typo for zooms 0 - 3 (`lakes` instead of `lake`).
This commit is contained in:
Tomas Pohanka
2022-05-05 14:26:57 +02:00
committed by GitHub
parent ef9a68b19a
commit 51751b5b78
2 changed files with 171 additions and 55 deletions

View File

@@ -12,6 +12,10 @@ layer:
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:
id:
description: |
From zoom 6 are taken OSM IDs. Up to zoom 5 there are used Natural Earth lakes, where are propagated the OSM IDs insted of Natural Earth IDs.
For smaller area then planet, NE lakes keep their Natural Earth IDs.
class:
description: |
All water polygons from [OpenStreetMapData](http://osmdata.openstreetmap.de/) have the class `ocean`.
@@ -39,7 +43,7 @@ layer:
- tunnel
buffer_size: 4
datasource:
query: (SELECT geometry, class, intermittent, brunnel FROM layer_water(!bbox!, z(!scale_denominator!))) AS t
query: (SELECT id, geometry, class, intermittent, brunnel FROM layer_water(!bbox!, z(!scale_denominator!))) AS t
schema:
- ./update_water.sql
- ./water.sql