From ebeafc65fad2352662b9de2a07cfafcebca23082 Mon Sep 17 00:00:00 2001 From: Falke Design Date: Fri, 5 Nov 2021 10:04:54 +0100 Subject: [PATCH] Add requires.tables to .yaml (#1236) **NOTE** this can only be merged after the next tools version is released. Added required Postgres tables to the `.yaml` definition. Close: #1220 PR of tools: https://github.com/openmaptiles/openmaptiles-tools/pull/370 --- layers/boundary/boundary.yaml | 8 ++++++++ layers/landcover/landcover.yaml | 3 +++ layers/landuse/landuse.yaml | 3 +++ layers/place/place.yaml | 5 +++++ layers/transportation/transportation.yaml | 3 +++ layers/transportation_name/transportation_name.yaml | 4 +++- layers/water/water.yaml | 5 ++++- layers/water_name/water_name.yaml | 4 ++++ layers/waterway/waterway.yaml | 4 +++- 9 files changed, 36 insertions(+), 3 deletions(-) diff --git a/layers/boundary/boundary.yaml b/layers/boundary/boundary.yaml index be124af8d..78f895501 100644 --- a/layers/boundary/boundary.yaml +++ b/layers/boundary/boundary.yaml @@ -1,5 +1,13 @@ layer: id: "boundary" + requires: + tables: + - osm_border_linestring + - ne_10m_admin_0_countries + - ne_10m_admin_0_boundary_lines_land + - ne_10m_admin_1_states_provinces_lines + - ne_50m_admin_0_boundary_lines_land + - ne_110m_admin_0_boundary_lines_land description: | Contains administrative boundaries as linestrings. Until z4 [Natural Earth data](http://www.naturalearthdata.com/downloads/) is used after which diff --git a/layers/landcover/landcover.yaml b/layers/landcover/landcover.yaml index 56536d056..a77f3fb50 100644 --- a/layers/landcover/landcover.yaml +++ b/layers/landcover/landcover.yaml @@ -1,5 +1,8 @@ layer: id: "landcover" + requires: + tables: + - ne_50m_antarctic_ice_shelves_polys description: | Landcover is used to describe the physical material at the surface of the earth. At lower zoom levels this is from Natural Earth data for glaciers and ice shelves and at higher zoom levels the landcover is [implied by OSM tags](http://wiki.openstreetmap.org/wiki/Landcover). The most common use case for this layer diff --git a/layers/landuse/landuse.yaml b/layers/landuse/landuse.yaml index 201c2f18d..ddbed4b22 100644 --- a/layers/landuse/landuse.yaml +++ b/layers/landuse/landuse.yaml @@ -1,5 +1,8 @@ layer: id: "landuse" + requires: + tables: + - ne_50m_urban_areas description: | Landuse is used to describe use of land by humans. At lower zoom levels this is from Natural Earth data for residential (urban) areas and at higher zoom levels mostly OSM `landuse` tags. diff --git a/layers/place/place.yaml b/layers/place/place.yaml index b02cfa5a3..00611690d 100644 --- a/layers/place/place.yaml +++ b/layers/place/place.yaml @@ -1,5 +1,10 @@ layer: id: "place" + requires: + tables: + - ne_10m_admin_1_states_provinces + - ne_10m_admin_0_countries + - ne_10m_admin_1_states_provinces description: | The place layer consists out of [countries](http://wiki.openstreetmap.org/wiki/Tag:place%3Dcountry), [states](http://wiki.openstreetmap.org/wiki/Tag:place%3Dstate) and [cities](http://wiki.openstreetmap.org/wiki/Key:place). diff --git a/layers/transportation/transportation.yaml b/layers/transportation/transportation.yaml index 51cb55a4b..a0d1073b6 100644 --- a/layers/transportation/transportation.yaml +++ b/layers/transportation/transportation.yaml @@ -1,5 +1,8 @@ layer: id: "transportation" + requires: + tables: + - ne_10m_admin_0_countries description: | **transportation** contains roads, railways, aerial ways, and shipping lines. diff --git a/layers/transportation_name/transportation_name.yaml b/layers/transportation_name/transportation_name.yaml index 9f90a7e96..790fc421b 100644 --- a/layers/transportation_name/transportation_name.yaml +++ b/layers/transportation_name/transportation_name.yaml @@ -1,7 +1,9 @@ layer: id: "transportation_name" # transportation_name relies on the function highway_class() defined in transportation layer - requires: "transportation" + requires: + layers: + - transportation description: | This is the layer for labelling the highways. Only highways that are named `name=*` and are long enough to place text upon appear. The OSM roads are stitched together if they contain the same name diff --git a/layers/water/water.yaml b/layers/water/water.yaml index dce377cc7..e4c4344c9 100644 --- a/layers/water/water.yaml +++ b/layers/water/water.yaml @@ -1,5 +1,8 @@ layer: id: "water" + requires: + tables: + - osm_ocean_polygon 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 @@ -12,7 +15,7 @@ layer: class: description: | All water polygons from [OpenStreetMapData](http://osmdata.openstreetmap.de/) have the class `ocean`. - Water bodies with the [`waterway=riverbank`](http://wiki.openstreetmap.org/wiki/Tag:waterway=riverbank) + Water bodies with the [`waterway=riverbank`](http://wiki.openstreetmap.org/wiki/Tag:waterway=riverbank) or [`water=river`](http://wiki.openstreetmap.org/wiki/Tag:water=river) tag are classified as river. Wet and dry docks tagged [`waterway=dock`](http://wiki.openstreetmap.org/wiki/Tag:waterway=dock) are classified as a `dock`. All other water bodies are classified as `lake`. diff --git a/layers/water_name/water_name.yaml b/layers/water_name/water_name.yaml index 82c4cff99..f88cac4e3 100644 --- a/layers/water_name/water_name.yaml +++ b/layers/water_name/water_name.yaml @@ -1,5 +1,9 @@ layer: id: "water_name" + requires: + tables: + - ne_10m_geography_marine_polys + - lake_centerline description: | Lake center lines for labelling lake bodies. This is based of the [osm-lakelines](https://github.com/lukasmartinelli/osm-lakelines) project diff --git a/layers/waterway/waterway.yaml b/layers/waterway/waterway.yaml index b07b9869e..63e6c4f16 100644 --- a/layers/waterway/waterway.yaml +++ b/layers/waterway/waterway.yaml @@ -1,7 +1,9 @@ layer: id: "waterway" # waterway relies on the function waterway_brunnel() defined in water layer - requires: "water" + requires: + layers: + - water description: | OpenStreetMap [waterways](https://wiki.openstreetmap.org/wiki/Waterways) for higher zoom levels (z9 and more) and Natural Earth rivers and lake centerlines for low zoom levels (z3 - z8).