kopia lustrzana https://github.com/openmaptiles/openmaptiles
Use different generalization levels at zooms
rodzic
aed323bb99
commit
30747a3bc8
|
@ -13,7 +13,7 @@ services:
|
|||
links:
|
||||
- postgres
|
||||
import-water:
|
||||
image: "openmaptiles/import-water"
|
||||
image: "openmaptiles/import-water:0.2"
|
||||
env_file: .env
|
||||
links:
|
||||
- postgres
|
||||
|
|
|
@ -1,22 +1,34 @@
|
|||
generalized_tables:
|
||||
|
||||
# etldoc: imposm3 -> osm_water_polygon_gen5
|
||||
water_polygon_gen5:
|
||||
source: water_polygon_gen4
|
||||
sql_filter: area>10000000.0
|
||||
tolerance: 320.0
|
||||
|
||||
# etldoc: imposm3 -> osm_water_polygon_gen4
|
||||
water_polygon_gen4:
|
||||
source: water_polygon_gen3
|
||||
sql_filter: area>5000000.0
|
||||
tolerance: 160.0
|
||||
|
||||
# etldoc: imposm3 -> osm_water_polygon_gen3
|
||||
water_polygon_gen3:
|
||||
source: water_polygon
|
||||
sql_filter: area>15000000.0 AND waterway = ''
|
||||
tolerance: 350.0
|
||||
source: water_polygon_gen2
|
||||
sql_filter: area>2500000.0
|
||||
tolerance: 80.0
|
||||
|
||||
# etldoc: imposm3 -> osm_water_polygon_gen2
|
||||
water_polygon_gen2:
|
||||
source: water_polygon
|
||||
sql_filter: area>2000000 AND waterway = ''
|
||||
tolerance: 200.0
|
||||
source: water_polygon_gen1
|
||||
sql_filter: area>1000000
|
||||
tolerance: 40.0
|
||||
|
||||
# etldoc: imposm3 -> osm_water_polygon_gen1
|
||||
water_polygon_gen1:
|
||||
source: water_polygon
|
||||
sql_filter: area>500000 AND waterway = ''
|
||||
tolerance: 100.0
|
||||
tolerance: 20.0
|
||||
|
||||
tables:
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ CREATE OR REPLACE VIEW water_z7 AS (
|
|||
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon_gen3 -> water_z7
|
||||
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen3
|
||||
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen5
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z8 AS (
|
||||
|
@ -65,30 +65,53 @@ CREATE OR REPLACE VIEW water_z8 AS (
|
|||
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon_gen2 -> water_z8
|
||||
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen2
|
||||
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen4
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z9 AS (
|
||||
-- etldoc: osm_ocean_polygon_gen3 -> water_z9
|
||||
SELECT geometry AS geom, 'ocean'::text AS class FROM osm_ocean_polygon_gen3
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon_gen1 -> water_z9
|
||||
SELECT geometry AS geom, 'lake'::text AS class FROM osm_water_polygon_gen1
|
||||
SELECT geometry AS geom, 'lake'::text AS class FROM osm_water_polygon_gen3
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z10 AS (
|
||||
-- etldoc: osm_ocean_polygon_gen2 -> water_z10
|
||||
SELECT geometry AS geom, 'ocean'::text AS class FROM osm_ocean_polygon_gen2
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon_gen2 -> water_z10
|
||||
SELECT geometry AS geom, 'lake'::text AS class FROM osm_water_polygon_gen2
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z11 AS (
|
||||
-- etldoc: osm_ocean_polygon_gen1 -> water_z11
|
||||
SELECT geometry AS geom, 'ocean'::text AS class FROM osm_ocean_polygon_gen1
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon -> water_z11
|
||||
SELECT geometry AS geom, water_class(waterway) AS class FROM osm_water_polygon WHERE area > 40000
|
||||
SELECT geometry AS geom, water_class(waterway) AS class FROM osm_water_polygon_gen1 WHERE area > 40000
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z12 AS (
|
||||
-- etldoc: osm_ocean_polygon_gen1 -> water_z12
|
||||
SELECT geometry AS geom, 'ocean'::text AS class FROM osm_ocean_polygon
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon -> water_z12
|
||||
SELECT geometry AS geom, water_class(waterway) AS class FROM osm_water_polygon WHERE area > 10000
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z13 AS (
|
||||
-- etldoc: osm_ocean_polygon -> water_z13
|
||||
SELECT geometry AS geom, 'ocean'::text AS class FROM osm_ocean_polygon
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon -> water_z13
|
||||
SELECT geometry AS geom, water_class(waterway) AS class FROM osm_water_polygon WHERE area > 5000
|
||||
);
|
||||
|
||||
CREATE OR REPLACE VIEW water_z14 AS (
|
||||
-- etldoc: osm_ocean_polygon -> water_z14
|
||||
SELECT geometry AS geom, 'ocean'::text AS class FROM osm_ocean_polygon
|
||||
UNION ALL
|
||||
-- etldoc: osm_water_polygon -> water_z14
|
||||
SELECT geometry AS geom, water_class(waterway) AS class FROM osm_water_polygon
|
||||
);
|
||||
|
@ -125,8 +148,10 @@ RETURNS TABLE(geom geometry, class text) AS $$
|
|||
SELECT * FROM water_z8 WHERE zoom_level = 8
|
||||
UNION ALL
|
||||
-- etldoc: water_z9 -> layer_water:z9
|
||||
SELECT * FROM water_z9 WHERE zoom_level = 9
|
||||
UNION ALL
|
||||
-- etldoc: water_z9 -> layer_water:z10
|
||||
SELECT * FROM water_z9 WHERE zoom_level BETWEEN 9 AND 10
|
||||
SELECT * FROM water_z9 WHERE zoom_level = 10
|
||||
UNION ALL
|
||||
-- etldoc: water_z11 -> layer_water:z11
|
||||
SELECT * FROM water_z11 WHERE zoom_level = 11
|
||||
|
|
Ładowanie…
Reference in New Issue