diff --git a/layers/transportation/etl_diagram.png b/layers/transportation/etl_diagram.png index fb043069..f960a379 100644 Binary files a/layers/transportation/etl_diagram.png and b/layers/transportation/etl_diagram.png differ diff --git a/layers/transportation/mapping.yaml b/layers/transportation/mapping.yaml index 1f01322b..29cd399b 100644 --- a/layers/transportation/mapping.yaml +++ b/layers/transportation/mapping.yaml @@ -31,6 +31,48 @@ generalized_tables: sql_filter: ST_IsValid(geometry) tolerance: ZRES13 +# etldoc: osm_shipway_linestring_gen_z5 -> osm_shipway_linestring_gen_z4 + shipway_linestring_gen_z4: + source: shipway_linestring_gen_z5 + sql_filter: ST_Length(geometry)>2*ZRES0 + tolerance: ZRES5 + +# etldoc: osm_shipway_linestring_gen_z6 -> osm_shipway_linestring_gen_z5 + shipway_linestring_gen_z5: + source: shipway_linestring_gen_z6 + sql_filter: ST_Length(geometry)>ZRES0 + tolerance: ZRES6 + +# etldoc: osm_shipway_linestring_gen_z7 -> osm_shipway_linestring_gen_z6 + shipway_linestring_gen_z6: + source: shipway_linestring_gen_z7 + sql_filter: ST_Length(geometry)>ZRES1 + tolerance: ZRES7 + +# etldoc: osm_shipway_linestring_gen_z8 -> osm_shipway_linestring_gen_z7 + shipway_linestring_gen_z7: + source: shipway_linestring_gen_z8 + sql_filter: ST_Length(geometry)>ZRES2 + tolerance: ZRES8 + +# etldoc: osm_shipway_linestring_gen_z9 -> osm_shipway_linestring_gen_z8 + shipway_linestring_gen_z8: + source: shipway_linestring_gen_z9 + sql_filter: ST_Length(geometry)>ZRES3 + tolerance: ZRES9 + +# etldoc: osm_shipway_linestring_gen_z10 -> osm_shipway_linestring_gen_z9 + shipway_linestring_gen_z9: + source: shipway_linestring_gen_z10 + sql_filter: ST_Length(geometry)>ZRES4 + tolerance: ZRES10 + +# etldoc: osm_shipway_linestring_gen_z11 -> osm_shipway_linestring_gen_z10 + shipway_linestring_gen_z10: + source: shipway_linestring_gen_z11 + sql_filter: ST_Length(geometry)>ZRES5 + tolerance: ZRES11 + # etldoc: osm_shipway_linestring_gen_z12 -> osm_shipway_linestring_gen_z11 shipway_linestring_gen_z11: source: shipway_linestring_gen_z12 diff --git a/layers/transportation/style.json b/layers/transportation/style.json index 1204bc36..d0f23575 100644 --- a/layers/transportation/style.json +++ b/layers/transportation/style.json @@ -5,13 +5,13 @@ "type": "line", "source": "openmaptiles", "source-layer": "transportation", - "minzoom": 10, + "minzoom": 4, "layout": { "line-join": "round", "visibility": "visible" }, "paint": { - "line-color": "#7d7df8", + "line-color": "#66f", "line-width": { "stops": [ [ @@ -25,8 +25,8 @@ ] }, "line-dasharray": [ - 2, - 2 + 6, + 6 ] }, "filter": [ diff --git a/layers/transportation/transportation.sql b/layers/transportation/transportation.sql index 7a516f65..3ef97918 100644 --- a/layers/transportation/transportation.sql +++ b/layers/transportation/transportation.sql @@ -674,6 +674,237 @@ FROM ( WHERE zoom_level >= 13 UNION ALL + -- etldoc: osm_shipway_linestring_gen_z4 -> layer_transportation:z4 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z4 + WHERE zoom_level = 4 + UNION ALL + + -- etldoc: osm_shipway_linestring_gen_z5 -> layer_transportation:z5 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z5 + WHERE zoom_level = 5 + UNION ALL + + -- etldoc: osm_shipway_linestring_gen_z6 -> layer_transportation:z6 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z6 + WHERE zoom_level = 6 + UNION ALL + + -- etldoc: osm_shipway_linestring_gen_z7 -> layer_transportation:z7 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z7 + WHERE zoom_level = 7 + UNION ALL + + -- etldoc: osm_shipway_linestring_gen_z8 -> layer_transportation:z8 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z8 + WHERE zoom_level = 8 + UNION ALL + + -- etldoc: osm_shipway_linestring_gen_z9 -> layer_transportation:z9 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z9 + WHERE zoom_level = 9 + UNION ALL + + -- etldoc: osm_shipway_linestring_gen_z10 -> layer_transportation:z10 + SELECT osm_id, + geometry, + NULL AS highway, + NULL AS construction, + NULL AS network, + NULL AS railway, + NULL AS aerialway, + shipway, + NULL AS public_transport, + service_value(service) AS service, + NULL::text AS access, + NULL::boolean AS toll, + is_bridge, + is_tunnel, + is_ford, + NULL::boolean AS expressway, + is_ramp, + is_oneway, + NULL AS man_made, + layer, + NULL::int AS level, + NULL::boolean AS indoor, + NULL AS bicycle, + NULL AS foot, + NULL AS horse, + NULL AS mtb_scale, + NULL AS surface, + z_order + FROM osm_shipway_linestring_gen_z10 + WHERE zoom_level = 10 + UNION ALL + -- etldoc: osm_shipway_linestring_gen_z11 -> layer_transportation:z11 SELECT osm_id, geometry, diff --git a/layers/transportation_name/etl_diagram.png b/layers/transportation_name/etl_diagram.png index d46ad20c..c4ee4e00 100644 Binary files a/layers/transportation_name/etl_diagram.png and b/layers/transportation_name/etl_diagram.png differ