Skip to content

Commit

Permalink
Update route lines layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Jun 30, 2024
1 parent c2025f3 commit ea9bb9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 72 deletions.
60 changes: 1 addition & 59 deletions images/tiler-server/config/providers/route_lines.toml
Original file line number Diff line number Diff line change
@@ -1,63 +1,5 @@
[[providers.layers]]
name = "route_lines_5_9"
geometry_fieldname = "geometry"
geometry_type = "LineString"
id_fieldname = "id"
sql = """
SELECT
ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 50), !BBOX!) AS geometry,
r.id,
r.name,
r.type,
r.tags->'ref' AS ref,
r.tags->'network' AS network,
r.start_date,
r.end_date,
CASE
WHEN is_date_valid(r.start_date) THEN isodatetodecimaldate(pad_date(r.start_date, 'start'))
ELSE NULL
END AS start_decdate,
CASE
WHEN is_date_valid(r.end_date) THEN isodatetodecimaldate(pad_date(r.end_date, 'end'))
ELSE NULL
END AS end_decdate
FROM osm_relations r
JOIN osm_relation_members m ON r.osm_id = m.osm_id
WHERE r.type = 'route'
AND geometry && !BBOX!
"""

[[providers.layers]]
name = "route_lines_10_15"
geometry_fieldname = "geometry"
geometry_type = "LineString"
id_fieldname = "id"
sql = """
SELECT
ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 20), !BBOX!) AS geometry,
r.id,
r.name,
r.type,
r.tags->'ref' AS ref,
r.tags->'network' AS network,
r.start_date,
r.end_date,
CASE
WHEN is_date_valid(r.start_date) THEN isodatetodecimaldate(pad_date(r.start_date, 'start'))
ELSE NULL
END AS start_decdate,
CASE
WHEN is_date_valid(r.end_date) THEN isodatetodecimaldate(pad_date(r.end_date, 'end'))
ELSE NULL
END AS end_decdate
FROM osm_relations r
JOIN osm_relation_members m ON r.osm_id = m.osm_id
WHERE r.type = 'route'
AND geometry && !BBOX!
"""

[[providers.layers]]
name = "route_lines_16_20"
name = "route_lines_5_20"
geometry_fieldname = "geometry"
geometry_type = "LineString"
id_fieldname = "id"
Expand Down
14 changes: 1 addition & 13 deletions images/tiler-server/config/providers/route_lines.zoom.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
[[maps.layers]]
name = "route_lines"
provider_layer = "osm.route_lines_5_9"
provider_layer = "osm.route_lines_5_20"
min_zoom = 5
max_zoom = 9

[[maps.layers]]
name = "route_lines"
provider_layer = "osm.route_lines_10_15"
min_zoom = 10
max_zoom = 15

[[maps.layers]]
name = "route_lines"
provider_layer = "osm.route_lines_16_20"
min_zoom = 16
max_zoom = 20

0 comments on commit ea9bb9c

Please sign in to comment.