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
16 changes: 14 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,12 @@ Layer:
ELSE NULL
END AS cycleway_right_oneway,
CASE
WHEN bicycle IN ('no', 'private') THEN 'no'
Phyks marked this conversation as resolved.
Show resolved Hide resolved
WHEN bicycle IS NOT NULL THEN bicycle
WHEN tags->'motorroad' IN ('yes') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IS NOT NULL THEN tags->'vehicle'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IS NOT NULL THEN access
ELSE NULL
END AS can_bicycle,
Expand Down Expand Up @@ -669,9 +672,12 @@ Layer:
ELSE NULL
END AS cycleway_right_oneway,
CASE
WHEN bicycle IN ('no', 'private') THEN 'no'
WHEN bicycle IS NOT NULL THEN bicycle
WHEN tags->'motorroad' IN ('yes') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IS NOT NULL THEN tags->'vehicle'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IS NOT NULL THEN access
ELSE NULL
END AS can_bicycle,
Expand Down Expand Up @@ -748,10 +754,13 @@ Layer:
END
) AS type,
CASE
WHEN bicycle IN ('no', 'private') THEN 'no'
WHEN bicycle IS NOT NULL THEN bicycle
WHEN tags->'motorroad' IN ('yes') THEN 'no'
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
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IS NOT NULL THEN tags->'vehicle'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IS NOT NULL THEN access
ELSE NULL
END AS can_bicycle
FROM planet_osm_roads
Expand Down Expand Up @@ -917,9 +926,12 @@ Layer:
ELSE NULL
END AS cycleway_right_oneway,
CASE
WHEN bicycle IN ('no', 'private') THEN 'no'
WHEN bicycle IS NOT NULL THEN bicycle
WHEN tags->'motorroad' IN ('yes') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND tags->'vehicle' IS NOT NULL THEN tags->'vehicle'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IN ('no', 'private') THEN 'no'
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IS NOT NULL THEN access
ELSE NULL
END AS can_bicycle,
Expand Down
Loading