Skip to content

Commit

Permalink
Render grass runways more grassy
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoek committed Mar 13, 2021
1 parent 99bab9c commit 928d478
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ Layer:
bridge IN ('yes', 'boardwalk', 'cantilever', 'covered', 'low_water_crossing', 'movable', 'trestle', 'viaduct') AS bridge,
CASE
WHEN surface IN ('paved', 'asphalt', 'concrete', 'concrete:lanes', 'concrete:plates', 'metal') THEN 'paved'
WHEN surface IN ('grass') THEN 'grass'
ELSE 'unpaved'
END AS int_surface,
-- Convert valid length units into metres. Fall back to a sensible default if no valid value was set.
Expand Down
12 changes: 12 additions & 0 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
@unpaved-taxiway-fill: @unpaved-aeroway-fill;
@unpaved-helipad-fill: @unpaved-aeroway-fill;
@unpaved-aeroway-runway-centreline: darken(@unpaved-aeroway-fill, 10%);
@grass-aeroway-fill: #d2dcab;
@grass-runway-fill: @grass-aeroway-fill;
@grass-stopway-fill: lighten(@grass-aeroway-fill, 5%);
@grass-taxiway-fill: @grass-aeroway-fill;
@grass-helipad-fill: @grass-aeroway-fill;
@grass-aeroway-runway-centreline: darken(@grass-aeroway-fill, 10%);

@access-marking: #eaeaea;
@access-marking-living-street: #cccccc;
Expand Down Expand Up @@ -2982,6 +2988,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
::fill {
line-color: @runway-fill;
[int_surface = 'unpaved'] { line-color: @unpaved-runway-fill; }
[int_surface = 'grass'] { line-color: @grass-runway-fill; }
/*
Take the computed width from the `width` tagged on the runway, if present.
A default value is set if this tag is missing.
Expand All @@ -2992,6 +2999,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-width: [line_width];
line-color: @aeroway-runway-centreline;
[int_surface = 'unpaved'] { line-color: @unpaved-aeroway-runway-centreline; }
[int_surface = 'grass'] { line-color: @grass-aeroway-runway-centreline; }
/* Keeps the dash-pattern roughly in sync with the line-width. */
line-dasharray: 12,8;
[zoom >= 16] { line-dasharray: 21,14; }
Expand All @@ -3004,6 +3012,8 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
marker-placement: line;
marker-fill: @aeroway-runway-centreline;
[int_surface = 'unpaved'] { marker-fill: @unpaved-aeroway-runway-centreline; }
/* Not likely with surface=grass, but for consistency's sake: */
[int_surface = 'grass'] { marker-fill: @grass-aeroway-runway-centreline; }
marker-width: [line_width] * 16;
marker-spacing: [line_width] * 50;
marker-file: url('symbols/displaced_threshold.svg');
Expand All @@ -3015,6 +3025,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
::fill {
line-color: @stopway-fill;
[int_surface = 'unpaved'] { line-color: @unpaved-stopway-fill; }
[int_surface = 'grass'] { line-color: @grass-stopway-fill; }
/* Same as aeroway=runway. */
line-width: [area_width];
}
Expand All @@ -3033,6 +3044,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
::fill {
line-color: @taxiway-fill;
[int_surface = 'unpaved'] { line-color: @unpaved-taxiway-fill; }
[int_surface = 'grass'] { line-color: @grass-taxiway-fill; }
line-width: 1;
[zoom >= 13] { line-width: 2; }
[zoom >= 14] { line-width: 4; }
Expand Down

0 comments on commit 928d478

Please sign in to comment.