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 highway=busway #4456

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions openstreetmap-carto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ local roads_info = {
primary_link = {z = 220, roads = true},
secondary_link = {z = 210, roads = true},
tertiary_link = {z = 200, roads = false},
busway = {z = 180, roads = false},
jdhoek marked this conversation as resolved.
Show resolved Hide resolved
bus_guideway = {z = 180, roads = false},
service = {z = 150, roads = false},
track = {z = 110, roads = false},
path = {z = 100, roads = false},
Expand Down
29 changes: 11 additions & 18 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,10 @@ Layer:
('unclassified', 4),
('residential', 5),
('living_street', 6),
('service', 7),
('track', 8)
('busway', 7),
('bus_guideway', 8),
('service', 9),
('track', 10)
) AS v (highway, prio)
ON v.highway = l.highway
WHERE p.highway IN (
Expand Down Expand Up @@ -707,6 +709,8 @@ Layer:
END AS int_surface,
CASE WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
-- highway=busway and highway=bus_guideway are access=no/bus=designated by default.
WHEN highway IN ('busway', 'bus_guideway') AND access IS NULL THEN 'no'::text
END AS access,
construction,
CASE
Expand Down Expand Up @@ -992,19 +996,6 @@ Layer:
cache-features: true
group-by: layernotnull
minzoom: 10
- id: guideways
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way
FROM planet_osm_line
WHERE highway = 'bus_guideway'
) AS guideways
properties:
minzoom: 11
- id: roller-coaster-gap-fill
geometry: linestring
<<: *extents
Expand Down Expand Up @@ -1929,7 +1920,7 @@ Layer:
horse, bicycle
FROM planet_osm_line l
WHERE highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary',
'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction')
'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'busway', 'bus_guideway', 'pedestrian', 'raceway', 'living_street', 'construction')
AND (name IS NOT NULL
OR oneway IN ('yes', '-1')
OR junction IN ('roundabout'))
Expand Down Expand Up @@ -2024,17 +2015,19 @@ Layer:
SELECT
osm_id,
way,
CASE WHEN highway IN ('unclassified', 'residential', 'track') THEN highway END AS highway,
CASE WHEN highway IN ('unclassified', 'residential', 'track', 'busway', 'bus_guideway') THEN highway END AS highway,
string_to_array(ref, ';') AS refs
FROM planet_osm_line
WHERE highway IN ('unclassified', 'residential', 'track')
WHERE highway IN ('unclassified', 'residential', 'track', 'busway', 'bus_guideway')
AND ref IS NOT NULL
) AS p) AS q
WHERE height <= 4 AND width <= 11
ORDER BY
CASE
WHEN highway = 'unclassified' THEN 33
WHEN highway = 'residential' THEN 32
WHEN highway = 'busway' THEN 31
WHEN highway = 'bus_guideway' THEN 31
WHEN highway = 'track' THEN 30
END DESC NULLS LAST,
height DESC,
Expand Down
3 changes: 2 additions & 1 deletion scripts/generate_unpaved_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def main():
'pedestrian-fill',
'living-street-fill',
'raceway-fill',
'residential-fill'
'residential-fill',
'busway-fill'
}

# List of names of mss files in which we search for color variables
Expand Down
Loading