Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render long-distance ferries at longer zooms #1486

Merged
merged 6 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified layers/transportation/etl_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions layers/transportation/mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions layers/transportation/style.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
[
Expand All @@ -25,8 +25,8 @@
]
},
"line-dasharray": [
2,
2
6,
6
]
},
"filter": [
Expand Down
231 changes: 231 additions & 0 deletions layers/transportation/transportation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Binary file modified layers/transportation_name/etl_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.