Skip to content

Commit

Permalink
Hide railway=platform with location=underground, tunnels and covered=…
Browse files Browse the repository at this point in the history
…yes (#3162)
  • Loading branch information
kocio-pl authored May 3, 2018
1 parent 5e8292b commit 096d82b
Showing 1 changed file with 23 additions and 6 deletions.
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

0 comments on commit 096d82b

Please sign in to comment.