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

Hide railway=platform with location=underground, tunnels and covered=yes #3162

Merged
merged 1 commit into from
May 3, 2018
Merged
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
29 changes: 23 additions & 6 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Layer:
z_order
FROM planet_osm_line
WHERE (tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes')
AND railway IS NOT NULL -- end of rail select
AND (railway NOT IN ('platform') AND railway IS NOT NULL) -- end of rail select
) AS features
ORDER BY
layernotnull,
Expand Down Expand Up @@ -692,11 +692,18 @@ Layer:
way,
COALESCE((
'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)),
('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END))
('railway_' || (CASE WHEN (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
THEN railway ELSE NULL END))
) AS feature
FROM planet_osm_polygon
WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform')
OR railway IN ('platform')
OR (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
ORDER BY COALESCE(layer,0), way_area DESC
) AS highway_area_casing
properties:
Expand Down Expand Up @@ -803,12 +810,19 @@ Layer:
COALESCE(
('highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street',
'track', 'path', 'platform', 'services') THEN highway ELSE NULL END)),
('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END)),
('railway_' || (CASE WHEN (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
THEN railway ELSE NULL END)),
(('aeroway_' || CASE WHEN aeroway IN ('runway', 'taxiway', 'helipad') THEN aeroway ELSE NULL END))
) AS feature
FROM planet_osm_polygon
WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'living_street', 'track', 'path', 'platform', 'services')
OR railway IN ('platform')
OR (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
OR aeroway IN ('runway', 'taxiway', 'helipad')
ORDER BY COALESCE(layer,0), way_area desc
) AS highway_area_fill
Expand Down Expand Up @@ -1858,7 +1872,10 @@ Layer:
name
FROM planet_osm_polygon
WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'living_street', 'track', 'path', 'platform')
OR railway IN ('platform')
OR (railway IN ('platform')
AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
AND (covered NOT IN ('yes') OR covered IS NULL))
OR (place IN ('square')
AND (leisure IS NULL OR NOT leisure IN ('park', 'common', 'recreation_ground', 'garden')))
AND name IS NOT NULL
Expand Down