Skip to content

Commit

Permalink
Add rendering for unpaved busway and bus_guideway
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoek committed Mar 14, 2023
1 parent 79a3e0e commit 82b9c63
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/generate_unpaved_patterns.py
Expand Up @@ -100,7 +100,8 @@ def main():
'pedestrian-fill',
'living-street-fill',
'raceway-fill',
'residential-fill'
'residential-fill',
'busway-fill'
}

# List of names of mss files in which we search for color variables
Expand Down
50 changes: 49 additions & 1 deletion style/roads.mss
Expand Up @@ -2124,7 +2124,6 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line-width: @busway-width-z14 - 2 * @casing-width-z14;
[feature = 'highway_bus_guideway'] { line-width: @busway-width-z14 - 6 * @casing-width-z14; }
b/line-width: @busway-width-z14 - 4 * @casing-width-z14;
b/line-width: @busway-width-z14 - 4 * @casing-width-z14;
b/line-color: white;
b/line-dasharray: 4 * @busway-width-z14, 4 * @busway-width-z14;
b/line-join: round;
Expand Down Expand Up @@ -2174,6 +2173,55 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}
}

#roads-fill[feature = 'highway_busway'][int_surface = 'unpaved'],
#roads-fill[feature = 'highway_bus_guideway'][int_surface = 'unpaved'],
#bridges[feature = 'highway_busway'][int_surface = 'unpaved'],
#bridges[feature = 'highway_bus_guideway'][int_surface = 'unpaved'] {
[zoom >= 16] {
line-pattern-type: repeat;
line-pattern-alignment: global;
line-pattern-file: url("symbols/unpaved/unpaved_busway-fill.svg");
line-pattern-width: @busway-width-z16 - 2 * @casing-width-z16;
b/line-width: @busway-width-z14 - 4 * @casing-width-z14;
b/line-color: white;
b/line-dasharray: 4 * @busway-width-z14, 4 * @busway-width-z14;
b/line-join: round;
[feature = 'highway_bus_guideway'] { line-pattern-width: @busway-width-z16 - 6 * @casing-width-z16; }
[zoom >= 17] {
line-pattern-width: @busway-width-z17 - 2 * @casing-width-z17;
[feature = 'highway_bus_guideway'] { line-pattern-width: @busway-width-z17 - 6 * @casing-width-z17; }
b/line-width: @busway-width-z17 - 4 * @casing-width-z17;
b/line-dasharray: 4 * @busway-width-z17, 4 * @busway-width-z17;
}
[zoom >= 18] {
line-pattern-width: @busway-width-z18 - 2 * @casing-width-z18;
[feature = 'highway_bus_guideway'] { line-pattern-width: @busway-width-z18 - 6 * @casing-width-z18; }
b/line-width: @busway-width-z18 - 4 * @casing-width-z18;
b/line-dasharray: 4 * @busway-width-z18, 4 * @busway-width-z18;
}
[zoom >= 19] {
line-pattern-width: @busway-width-z19 - 2 * @casing-width-z19;
[feature = 'highway_bus_guideway'] { line-pattern-width: @busway-width-z19 - 6 * @casing-width-z19; }
b/line-width: @busway-width-z19 - 4 * @casing-width-z19;
b/line-dasharray: 4 * @busway-width-z19, 4 * @busway-width-z19;
}
[zoom >= 20] {
line-pattern-width: @busway-width-z20 - 2 * @casing-width-z20;
[feature = 'highway_bus_guideway'] { line-pattern-width: @busway-width-z20 - 6 * @casing-width-z20; }
b/line-width: @busway-width-z20 - 6 * @casing-width-z20;
b/line-dasharray: 4 * @busway-width-z20, 4 * @busway-width-z20;
}
line-join: round;
line-cap: round;
#bridges {
line-pattern-width: @busway-width-z16 - 2 * @bridge-casing-width-z16;
[zoom >= 17] { line-pattern-width: @busway-width-z17 - 2 * @bridge-casing-width-z17; }
[zoom >= 18] { line-pattern-width: @busway-width-z18 - 2 * @bridge-casing-width-z18; }
[zoom >= 19] { line-pattern-width: @busway-width-z19 - 2 * @bridge-casing-width-z19; }
[zoom >= 20] { line-pattern-width: @busway-width-z20 - 2 * @bridge-casing-width-z20; }
}
}
}

#roads-fill[feature = 'highway_service'],
#bridges[feature = 'highway_service'],
Expand Down
39 changes: 39 additions & 0 deletions symbols/unpaved/unpaved_busway-fill.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 82b9c63

Please sign in to comment.