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

Optimize roads.mss #364

Merged
merged 11 commits into from
May 20, 2020
19 changes: 11 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ Layer:
(
SELECT way, aeroway AS type
FROM planet_osm_line
WHERE aeroway IN ('apron', 'runway', 'taxiway')
WHERE aeroway IN ('runway', 'taxiway')
) AS data
geometry: linestring
properties:
minzoom: 10
minzoom: 11
- id: tunnel
<<: *extents
Datasource:
Expand All @@ -447,6 +447,7 @@ Layer:
COALESCE(
CASE
WHEN highway='raceway' THEN 'track' -- render raceways as tracks
WHEN highway='road' THEN 'residential' -- render "road" as residential
WHEN highway='footway' AND (bicycle='yes' OR bicycle='designated') THEN 'path'
WHEN highway='bridleway' AND (bicycle='yes' OR bicycle='designated') THEN 'path'
WHEN highway!='bus_guideway' THEN highway
Expand Down Expand Up @@ -536,8 +537,8 @@ Layer:
ELSE 'no'
END AS oneway_bicycle,
COALESCE(
tags->'ramp:stroller',
tags->'ramp:bicycle',
tags->'ramp:stroller',
tags->'ramp:wheelchair',
tags->'ramp:luggage'
) AS has_ramp,
Expand Down Expand Up @@ -594,6 +595,7 @@ Layer:
COALESCE(
CASE
WHEN highway='raceway' THEN 'track' -- render raceways as tracks
WHEN highway='road' THEN 'residential' -- render "road" as residential
WHEN highway='footway' AND (bicycle='yes' OR bicycle='designated') THEN 'path'
WHEN highway='bridleway' AND (bicycle='yes' OR bicycle='designated') THEN 'path'
WHEN highway!='bus_guideway' THEN highway
Expand Down Expand Up @@ -682,8 +684,8 @@ Layer:
ELSE 'no'
END AS oneway_bicycle,
COALESCE(
tags->'ramp:stroller',
tags->'ramp:bicycle',
tags->'ramp:stroller',
tags->'ramp:wheelchair',
tags->'ramp:luggage'
) AS has_ramp,
Expand Down Expand Up @@ -748,13 +750,13 @@ Layer:
CASE
WHEN bicycle IS NOT NULL THEN bicycle
WHEN tags->'motorroad' IN ('yes') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IS NOT NULL THEN tags->'vehicle'
Phyks marked this conversation as resolved.
Show resolved Hide resolved
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IS NOT NULL THEN access
WHEN highway NOT IN ('motorway') AND tags->'vehicle' IS NOT NULL THEN tags->'vehicle'
WHEN highway NOT IN ('motorway') AND access IS NOT NULL THEN access
ELSE NULL
END AS can_bicycle
FROM planet_osm_roads
WHERE (railway IN ('rail')
OR highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'secondary', 'railway'))
OR highway IN ('motorway', 'trunk', 'primary', 'secondary'))
AND way && !bbox!
ORDER BY CASE
WHEN railway IS NOT NULL THEN 0
Expand Down Expand Up @@ -840,6 +842,7 @@ Layer:
COALESCE(
CASE
WHEN highway='raceway' THEN 'track' -- render raceways as tracks
WHEN highway='road' THEN 'residential' -- render "road" as residential
WHEN highway='footway' AND (bicycle='yes' OR bicycle='designated') THEN 'path'
WHEN highway='bridleway' AND (bicycle='yes' OR bicycle='designated') THEN 'path'
WHEN highway!='bus_guideway' THEN highway
Expand Down Expand Up @@ -929,8 +932,8 @@ Layer:
ELSE 'no'
END AS oneway_bicycle,
COALESCE(
tags->'ramp:stroller',
tags->'ramp:bicycle',
tags->'ramp:stroller',
tags->'ramp:wheelchair',
tags->'ramp:luggage'
) AS has_ramp,
Expand Down
1 change: 0 additions & 1 deletion road-colors.mss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
@standard-fill: #f6f6f6;
@standard-nobicycle: #d4d4d4;
@tertiary-case: #777;
@tertiary-fill: #f6f6f6;
@pedestrian-case: #bbb;
@pedestrian-fill: @speedWalk-fill;
@pedestrian_area_fill: #dce3e0;
Expand Down
Loading