Skip to content

Commit

Permalink
Add support for runway=displaced_threshold
Browse files Browse the repository at this point in the history
Stop rendering its `ref` (this is better left to the main body of the
`aeroway=runway` and draw the arrows that are typically used to mark a
displaced threshold in aviation.
  • Loading branch information
jdhoek committed Mar 11, 2021
1 parent b3b18fb commit 7191597
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
19 changes: 14 additions & 5 deletions project.mml
Expand Up @@ -1035,6 +1035,7 @@ Layer:
(SELECT
way,
aeroway,
runway,
bridge,
width,
width::real/sf AS area_width,
Expand All @@ -1043,6 +1044,7 @@ Layer:
(SELECT
way,
aeroway,
tags->'runway' AS runway,
bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct') AS bridge,
-- Convert valid length units into metres. Fall back to a sensible default if no valid value was set.
GREATEST(
Expand Down Expand Up @@ -1800,13 +1802,20 @@ Layer:
SELECT
osm_id,
way,
COALESCE(
CASE WHEN highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary') THEN highway END,
CASE WHEN aeroway IN ('runway', 'taxiway') THEN aeroway END
) AS highway,
highway,
string_to_array(ref, ';') AS refs
FROM planet_osm_line
WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary')
AND ref IS NOT NULL
UNION ALL
SELECT
osm_id,
way,
aeroway AS highway,
string_to_array(ref, ';') AS refs
FROM planet_osm_line
WHERE (highway IN ('motorway', 'trunk', 'primary', 'secondary', 'tertiary') OR aeroway IN ('runway', 'taxiway'))
WHERE aeroway IN ('runway', 'taxiway')
AND NOT tags @> '"runway"=>"displaced_threshold"'
AND ref IS NOT NULL
) AS p) AS q
WHERE height <= 4 AND width <= 11
Expand Down
8 changes: 8 additions & 0 deletions style/roads.mss
Expand Up @@ -2991,6 +2991,14 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[zoom >= 18] { line-dasharray: 84,56; }
[zoom >= 19] { line-dasharray: 168,112; }
[zoom >= 20] { line-dasharray: 336,224; }
[runway = "displaced_threshold"] {
line-width: 0;
marker-placement: line;
marker-fill: white;
marker-width: [line_width] * 16;
marker-spacing: [line_width] * 50;
marker-file: url('symbols/displaced_threshold.svg');
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions symbols/displaced_threshold.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7191597

Please sign in to comment.