Skip to content

Commit

Permalink
No longer railway preserved as railway=rail
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed May 10, 2024
1 parent aaf5fe2 commit 0581639
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ Layer:
SELECT
way,
'railway_' || (CASE
WHEN (railway IN ('rail', 'preserved') AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN railway = 'preserved' THEN 'rail'
WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service'
ELSE railway END) AS feature,
horse,
Expand All @@ -507,7 +506,7 @@ Layer:
CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,
'no' AS link,
(CASE
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'preserved', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
ELSE 'no'
END) AS preserved,
COALESCE(layer,0) AS layernotnull,
Expand Down Expand Up @@ -737,8 +736,7 @@ Layer:
SELECT
way,
'railway_' || (CASE
WHEN (railway IN ('rail', 'preserved') AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN railway = 'preserved' THEN 'rail'
WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service'
ELSE railway END) AS feature,
horse,
Expand All @@ -759,7 +757,7 @@ Layer:
CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') OR leisure IN ('slipway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,
'no' AS link,
(CASE
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'preserved', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
ELSE 'no'
END) AS preserved,
COALESCE(layer,0) AS layernotnull,
Expand Down Expand Up @@ -972,8 +970,7 @@ Layer:
SELECT
way,
'railway_' || (CASE
WHEN (railway IN ('rail', 'preserved') AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN railway = 'preserved' THEN 'rail'
WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service'
ELSE railway END) AS feature,
horse,
Expand All @@ -989,7 +986,7 @@ Layer:
CASE WHEN service IN ('parking_aisle', 'drive-through', 'driveway') THEN 'INT-minor'::text ELSE 'INT-normal'::text END AS service,
'no' AS link,
(CASE
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'preserved', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
ELSE 'no'
END) AS preserved,
COALESCE(layer,0) AS layernotnull,
Expand Down Expand Up @@ -1996,8 +1993,7 @@ Layer:
(SELECT
way,
CASE
WHEN (railway IN ('rail', 'preserved') AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN railway = 'preserved' THEN 'rail'
WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN (railway = 'tram' AND service IN ('spur', 'siding', 'yard')) THEN 'tram-service'
ELSE railway
END AS railway,
Expand All @@ -2007,12 +2003,11 @@ Layer:
construction,
name,
(CASE
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'preserved', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
WHEN railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge', 'miniature', 'subway', 'tram', 'monorail', 'disused') AND tags->'railway:preserved' = 'yes' THEN 'yes'
ELSE 'no'
END) AS preserved
FROM planet_osm_line l
WHERE railway IN ('rail', 'subway', 'narrow_gauge', 'light_rail', 'preserved', 'funicular',
'monorail', 'miniature', 'tram', 'disused', 'construction')
WHERE railway IN ('rail', 'subway', 'narrow_gauge', 'light_rail', 'funicular', 'monorail', 'miniature', 'tram', 'disused', 'construction')
AND (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))
AND highway IS NULL -- Prevent duplicate rendering
AND name IS NOT NULL
Expand Down

0 comments on commit 0581639

Please sign in to comment.