Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional access marking #5049

Merged
merged 4 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ SELECT
WHEN 'bridleway' THEN carto_int_access(horse, FALSE)
ELSE carto_int_access(COALESCE(NULLIF(foot, 'unknown'), "access"), FALSE)
END
WHEN highway IN ('pedestrian', 'footway', 'steps') THEN carto_int_access(COALESCE(NULLIF(foot, 'unknown'), "access"), FALSE)
WHEN highway = 'pedestrian' THEN carto_int_access(COALESCE(NULLIF(foot, 'unknown'), "access"), TRUE)
WHEN highway IN ('footway', 'steps') THEN carto_int_access(COALESCE(NULLIF(foot, 'unknown'), "access"), FALSE)
WHEN highway = 'cycleway' THEN carto_int_access(COALESCE(NULLIF(bicycle, 'unknown'), "access"), FALSE)
WHEN highway = 'bridleway' THEN carto_int_access(COALESCE(NULLIF(horse, 'unknown'), "access"), FALSE)
ELSE carto_int_access("access", TRUE)
Expand Down
22 changes: 16 additions & 6 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
@taxiway-fill: @aeroway-fill;
@helipad-fill: @aeroway-fill;
@access-marking: #eaeaea;
@access-marking-primary: #f0f0f0;
/* access-marking-light is used on some darker highways for better contrast */
@access-marking-light: #f0f0f0;
@access-marking-secondary: #e4e4e4;
@access-marking-white-unpaved: #e0e0e0;
@access-marking-road: #f0f0f0;
@access-marking-living-street: #d4d4d4;

@default-casing: white;
Expand Down Expand Up @@ -3397,16 +3397,24 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
#roads-fill::fill,
#bridges::fill {
[int_access = 'restricted'] {
[feature = 'highway_motorway'],
[feature = 'highway_trunk'],
[feature = 'highway_primary'],
[feature = 'highway_secondary'],
[feature = 'highway_tertiary'],
[feature = 'highway_unclassified'],
[feature = 'highway_residential'],
[feature = 'highway_pedestrian'],
[feature = 'highway_living_street'] {
[zoom >= 15] {
access/line-color: @access-marking;
[int_surface = 'unpaved'] {
access/line-color: @access-marking-white-unpaved;
}
[feature = 'highway_primary'],
[feature = 'highway_pedestrian'] {
access/line-color: @access-marking-light;
}
[feature = 'highway_secondary'] {
access/line-color: @access-marking-secondary;
}
Expand All @@ -3431,7 +3439,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
access/line-color: @access-marking-white-unpaved;
}
[feature = 'highway_road'] {
access/line-color: @access-marking-road;
access/line-color: @access-marking-light;
}
access/line-join: round;
access/line-cap: round;
Expand Down Expand Up @@ -3467,6 +3475,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
[feature = 'highway_tertiary'],
[feature = 'highway_unclassified'],
[feature = 'highway_residential'],
[feature = 'highway_pedestrian'],
[feature = 'highway_living_street'] {
[zoom >= 15] {
access/line-color: @access-marking;
Expand All @@ -3477,8 +3486,9 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
access/line-color: @access-marking-white-unpaved;
}
}
[feature = 'highway_primary'] {
access/line-color: @access-marking-primary;
[feature = 'highway_primary'],
[feature = 'highway_pedestrian'] {
access/line-color: @access-marking-light;
}
[feature = 'highway_secondary'] {
access/line-color: @access-marking-secondary;
Expand All @@ -3504,7 +3514,7 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
access/line-color: @access-marking-white-unpaved;
}
[feature = 'highway_road'] {
access/line-color: @access-marking-road;
access/line-color: @access-marking-light;
}
access/line-join: round;
access/line-cap: round;
Expand Down