Skip to content

Commit

Permalink
low zooms: do not render preserved railways
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed May 11, 2024
1 parent 9d615b7 commit 8b0385c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ Layer:
END AS int_surface
FROM planet_osm_roads
WHERE highway IS NOT NULL
OR (railway IN ('rail', 'tram', 'light_rail', 'funicular', 'narrow_gauge')
OR (railway IN ('rail', 'light_rail', 'funicular', 'narrow_gauge')
AND (tags->'railway:preserved' IS NULL OR tags->'railway:preserved' != 'yes')
AND (service IS NULL OR service NOT IN ('spur', 'siding', 'yard')))
ORDER BY
Expand Down
8 changes: 6 additions & 2 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -2523,7 +2523,9 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
}
}

[feature = 'railway_rail'][zoom >= 8],
[feature = 'railway_rail'][zoom >= 8][zoom < 10],
[feature = 'railway_rail'][preserved != 'yes'][zoom >= 10][zoom < 12],
[feature = 'railway_rail'][zoom >= 12],
[feature = 'railway_INT-spur-siding-yard'][zoom >= 13] {
[zoom < 13] {
line-color: #787878;
Expand Down Expand Up @@ -2599,7 +2601,9 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[feature = 'railway_light_rail'],
[feature = 'railway_funicular'],
[feature = 'railway_narrow_gauge'] {
[zoom >= 8] {
[zoom >= 8][zoom < 10],
[preserved != 'yes'][zoom >= 10][zoom < 12],
[zoom >= 12] {
line-color: #ccc;
[zoom >= 10] { line-color: #aaa; }
[zoom >= 13] { line-color: #666; }
Expand Down

0 comments on commit 8b0385c

Please sign in to comment.