diff --git a/layers/landcover/landcover.sql b/layers/landcover/landcover.sql index a9832bb3..b30a1ea7 100644 --- a/layers/landcover/landcover.sql +++ b/layers/landcover/landcover.sql @@ -98,31 +98,31 @@ RETURNS TABLE(osm_id bigint, geometry geometry, class text, subclass text) AS $$ WHERE zoom_level BETWEEN 5 AND 7 AND geometry && bbox UNION ALL -- etldoc: landcover_z8 -> layer_landcover:z8 - SELECT osm_id, geometry, landuse, "natural", wetland + SELECT * FROM landcover_z8 WHERE zoom_level = 8 AND geometry && bbox UNION ALL -- etldoc: landcover_z9 -> layer_landcover:z9 - SELECT osm_id, geometry, landuse, "natural", wetland + SELECT * FROM landcover_z9 WHERE zoom_level = 9 AND geometry && bbox UNION ALL -- etldoc: landcover_z10 -> layer_landcover:z10 - SELECT osm_id, geometry, landuse, "natural", wetland + SELECT * FROM landcover_z10 WHERE zoom_level = 10 AND geometry && bbox UNION ALL -- etldoc: landcover_z11 -> layer_landcover:z11 - SELECT osm_id, geometry, landuse, "natural", wetland + SELECT * FROM landcover_z11 WHERE zoom_level = 11 AND geometry && bbox UNION ALL -- etldoc: landcover_z12 -> layer_landcover:z12 - SELECT osm_id, geometry, landuse, "natural", wetland + SELECT * FROM landcover_z12 WHERE zoom_level = 12 AND geometry && bbox UNION ALL -- etldoc: landcover_z13 -> layer_landcover:z13 - SELECT osm_id, ST_Simplify(geometry, 10) AS geometry, landuse, "natural", wetland + SELECT * FROM landcover_z13 WHERE zoom_level = 13 AND geometry && bbox UNION ALL -- etldoc: landcover_z14 -> layer_landcover:z14_ - SELECT osm_id, geometry, landuse, "natural", wetland + SELECT * FROM landcover_z14 WHERE zoom_level >= 14 AND geometry && bbox ) AS zoom_levels; $$ LANGUAGE SQL IMMUTABLE; diff --git a/layers/landuse/landuse.sql b/layers/landuse/landuse.sql index 961a7dff..49e5bc15 100644 --- a/layers/landuse/landuse.sql +++ b/layers/landuse/landuse.sql @@ -28,7 +28,8 @@ CREATE OR REPLACE VIEW landuse_z6 AS ( -- etldoc: osm_landuse_polygon_gen3 -> landuse_z10 CREATE OR REPLACE VIEW landuse_z10 AS ( - SELECT osm_id, geometry, landuse, amenity, leisure, NULL::int as scalerank FROM osm_landuse_polygon_gen3 + SELECT osm_id, geometry, landuse, amenity, leisure, NULL::int as scalerank + FROM osm_landuse_polygon_gen3 ); -- etldoc: osm_landuse_polygon_gen2 -> landuse_z11 @@ -52,7 +53,8 @@ CREATE OR REPLACE VIEW landuse_z13 AS ( -- etldoc: osm_landuse_polygon -> landuse_z14 CREATE OR REPLACE VIEW landuse_z14 AS ( - SELECT osm_id, geometry, landuse, amenity, leisure, NULL::int as scalerank FROM osm_landuse_polygon + SELECT osm_id, geometry, landuse, amenity, leisure, NULL::int as scalerank + FROM osm_landuse_polygon ); -- etldoc: layer_landuse[shape=record fillcolor=lightpink, style="rounded,filled", diff --git a/layers/landuse/mapping.yaml b/layers/landuse/mapping.yaml index 2ac1f6cc..c3c1d577 100644 --- a/layers/landuse/mapping.yaml +++ b/layers/landuse/mapping.yaml @@ -1,6 +1,6 @@ generalized_tables: # etldoc: imposm3 -> osm_landuse_polygon_gen3 - landuse_polygon_gen2: + landuse_polygon_gen3: source: landuse_polygon_gen2 sql_filter: area>960000 tolerance: 160.0