Show aeroways sooner

This commit is contained in:
jirik 2017-09-26 14:37:42 +02:00 committed by Jiri Kozel
parent cf0c78305b
commit daeb8c6605
3 changed files with 35 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -1,15 +1,31 @@
-- etldoc: layer_aeroway[shape=record fillcolor=lightpink, style="rounded,filled",
-- etldoc: label="layer_aeroway |<z11> z11|<z12> z12|<z13> z13|<z14_> z14+" ];
-- etldoc: label="layer_aeroway |<z10> z10|<z11> z11|<z12> z12|<z13> z13|<z14_> z14+" ];
CREATE OR REPLACE FUNCTION layer_aeroway(bbox geometry, zoom_level int)
RETURNS TABLE(geometry geometry, class text, ref text) AS $$
SELECT geometry, aeroway AS class, ref FROM (
-- etldoc: osm_aeroway_linestring -> layer_aeroway:z11
-- etldoc: osm_aeroway_linestring -> layer_aeroway:z12
-- etldoc: osm_aeroway_linestring_gen3 -> layer_aeroway:z10
SELECT geometry, aeroway, ref
FROM osm_aeroway_linestring_gen3 WHERE zoom_level = 10
UNION ALL
-- etldoc: osm_aeroway_linestring_gen2 -> layer_aeroway:z11
SELECT geometry, aeroway, ref
FROM osm_aeroway_linestring_gen2 WHERE zoom_level = 11
UNION ALL
-- etldoc: osm_aeroway_linestring_gen1 -> layer_aeroway:z12
SELECT geometry, aeroway, ref
FROM osm_aeroway_linestring_gen1 WHERE zoom_level = 12
UNION ALL
-- etldoc: osm_aeroway_linestring -> layer_aeroway:z13
-- etldoc: osm_aeroway_linestring -> layer_aeroway:z14_
SELECT geometry, aeroway, ref
FROM osm_aeroway_linestring WHERE zoom_level >= 11
FROM osm_aeroway_linestring WHERE zoom_level >= 13
UNION ALL
-- etldoc: osm_aeroway_polygon_gen3 -> layer_aeroway:z10
-- etldoc: osm_aeroway_polygon_gen3 -> layer_aeroway:z11
SELECT geometry, aeroway, ref
FROM osm_aeroway_polygon_gen3 WHERE zoom_level BETWEEN 10 AND 11
UNION ALL
-- etldoc: osm_aeroway_polygon_gen2 -> layer_aeroway:z12
SELECT geometry, aeroway, ref

View File

@ -1,4 +1,19 @@
generalized_tables:
# etldoc: imposm3 -> osm_aeroway_linestring_gen3
aeroway_linestring_gen3:
source: aeroway_linestring_gen2
tolerance: ZRES11
# etldoc: imposm3 -> osm_aeroway_linestring_gen2
aeroway_linestring_gen2:
source: aeroway_linestring_gen1
tolerance: ZRES12
# etldoc: imposm3 -> osm_aeroway_linestring_gen1
aeroway_linestring_gen1:
source: aeroway_linestring
tolerance: ZRES13
# etldoc: imposm3 -> osm_aeroway_polygon_gen3
aeroway_polygon_gen3:
source: aeroway_polygon_gen2