removing ne_10m source

pull/717/head
Eva J 2019-11-27 11:51:15 +01:00
rodzic 9bfdefca31
commit 60b4a4cebc
2 zmienionych plików z 22 dodań i 6 usunięć

Wyświetl plik

@ -11,10 +11,16 @@ CREATE OR REPLACE VIEW landuse_z5 AS (
FROM ne_50m_urban_areas
);
-- etldoc: ne_10m_urban_areas -> landuse_z6
-- etldoc: osm_landuse_polygon_gen5 -> landuse_z6
CREATE OR REPLACE VIEW landuse_z6 AS (
SELECT NULL::bigint AS osm_id, geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS tourism, NULL::text AS place, NULL::text AS waterway, scalerank
FROM ne_10m_urban_areas
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, waterway, NULL::int as scalerank
FROM osm_landuse_polygon_gen7
);
-- etldoc: osm_landuse_polygon_gen5 -> landuse_z8
CREATE OR REPLACE VIEW landuse_z8 AS (
SELECT osm_id, geometry, landuse, amenity, leisure, tourism, place, waterway, NULL::int as scalerank
FROM osm_landuse_polygon_gen6
);
-- etldoc: osm_landuse_polygon_gen5 -> landuse_z9
@ -78,9 +84,10 @@ RETURNS TABLE(osm_id bigint, geometry geometry, class text) AS $$
UNION ALL
-- etldoc: landuse_z6 -> layer_landuse:z6
-- etldoc: landuse_z6 -> layer_landuse:z7
-- etldoc: landuse_z6 -> layer_landuse:z8
SELECT * FROM landuse_z6
WHERE zoom_level BETWEEN 6 AND 8 AND scalerank-1 <= zoom_level
SELECT * FROM landuse_z6 WHERE zoom_level BETWEEN 6 AND 7
UNION ALL
-- etldoc: landuse_z8 -> layer_landuse:z8
SELECT * FROM landuse_z8 WHERE zoom_level = 8
UNION ALL
-- etldoc: landuse_z9 -> layer_landuse:z9
SELECT * FROM landuse_z9 WHERE zoom_level = 9

Wyświetl plik

@ -1,4 +1,13 @@
generalized_tables:
# etldoc: imposm3 -> osm_landuse_polygon_gen7
landuse_polygon_gen7:
source: landuse_polygon_gen6
tolerance: ZRES7
# etldoc: imposm3 -> osm_landuse_polygon_gen6
landuse_polygon_gen6:
source: landuse_polygon_gen5
sql_filter: area>power(ZRES6,2) AND (landuse='residential' OR place='suburb' OR place='neighbourhood')
tolerance: ZRES8
# etldoc: imposm3 -> osm_landuse_polygon_gen5
landuse_polygon_gen5:
source: landuse_polygon_gen4