diff --git a/layers/park/layer.sql b/layers/park/layer.sql index 7f79fc1e..f684b77c 100644 --- a/layers/park/layer.sql +++ b/layers/park/layer.sql @@ -1,11 +1,16 @@ -- etldoc: layer_park[shape=record fillcolor=lightpink, style="rounded,filled", --- etldoc: label="layer_park | z8 | z9 | z10 | z11 | z12| z13| z14_" ] ; +-- etldoc: label="layer_park | z6 | z7 | z8 | z9 | z10 | z11 | z12| z13| z14" ] ; CREATE OR REPLACE FUNCTION layer_park(bbox geometry, zoom_level int) RETURNS TABLE(osm_id bigint, geometry geometry, class text) AS $$ SELECT osm_id, geometry, COALESCE(NULLIF(leisure, ''), NULLIF(boundary, '')) AS class FROM ( + -- etldoc: osm_park_polygon_gen8 -> layer_park:z6 + SELECT osm_id, geometry, leisure, boundary, NULL::int as scalerank + FROM osm_park_polygon_gen6 + WHERE zoom_level = 6 + UNION ALL -- etldoc: osm_park_polygon_gen7 -> layer_park:z7 SELECT osm_id, geometry, leisure, boundary, NULL::int as scalerank FROM osm_park_polygon_gen7 diff --git a/layers/park/mapping.yaml b/layers/park/mapping.yaml index c1eecb4e..29fb1f0f 100644 --- a/layers/park/mapping.yaml +++ b/layers/park/mapping.yaml @@ -1,5 +1,11 @@ generalized_tables: - # etldoc: imposm3 -> osm_park_polygon_gen6 + # etldoc: imposm3 -> osm_park_polygon_gen8 + park_polygon_gen8: + source: park_polygon_gen6 + sql_filter: area>240000000 + tolerance: 600.0 + + # etldoc: imposm3 -> osm_park_polygon_gen7 park_polygon_gen7: source: park_polygon_gen6 sql_filter: area>60000000