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

Better segregated rendering #450

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ Layer:
ELSE NULL
END AS can_bicycle,
CASE
WHEN tags->'segregated' IN ('yes') THEN 'yes'
WHEN tags->'segregated' = 'yes' AND (horse IN ('designated', 'yes') OR highway='bridleway' OR (highway='path' AND horse != 'no')) THEN 'horse'
WHEN tags->'segregated' = 'yes' THEN 'foot'
ELSE 'no'
END AS segregated,
CASE
Expand Down Expand Up @@ -721,7 +722,8 @@ Layer:
ELSE NULL
END AS can_bicycle,
CASE
WHEN tags->'segregated' IN ('yes') THEN 'yes'
WHEN tags->'segregated' = 'yes' AND (horse IN ('designated', 'yes') OR highway='bridleway' OR (highway='path' AND horse != 'no')) THEN 'horse'
WHEN tags->'segregated' = 'yes' THEN 'foot'
ELSE 'no'
END AS segregated,
CASE
Expand Down Expand Up @@ -984,7 +986,8 @@ Layer:
ELSE NULL
END AS can_bicycle,
CASE
WHEN tags->'segregated' IN ('yes') THEN 'yes'
WHEN tags->'segregated' = 'yes' AND (horse IN ('designated', 'yes') OR highway='bridleway' OR (highway='path' AND horse != 'no')) THEN 'horse'
WHEN tags->'segregated' = 'yes' THEN 'foot'
ELSE 'no'
END AS segregated,
CASE
Expand Down
29 changes: 18 additions & 11 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -756,22 +756,29 @@
}


#roads_high::path_outline_right[zoom>=17][type='path'][can_bicycle='designated'][segregated='yes'],
#tunnel::path_outline_right[zoom>=17][type='path'][can_bicycle='designated'][segregated='yes'],
#bridge::path_outline_right[zoom>=17][type='path'][can_bicycle='designated'][segregated='yes'] {
#roads_high::path_outline_right[zoom>=17][type='path'][can_bicycle!='no'][segregated!='no'],
#tunnel::path_outline_right[zoom>=17][type='path'][can_bicycle!='no'][segregated!='no'],
#bridge::path_outline_right[zoom>=17][type='path'][can_bicycle!='no'][segregated!='no'] {
line-cap: butt;
line-color: @path-fill;
brainwad marked this conversation as resolved.
Show resolved Hide resolved
line-color: @footway-fill;
[segregated='horse'] { line-color: @bridleway-fill; }

line-width: @rdz17_path;
line-offset: @rdz17_path/2 + @rdz17_cycle/2;
[oneway='no'][oneway_bicycle='no'] {
line-width: @rdz17_path; line-offset: @rdz17_path/2 + @rdz17_cycle*1.5/2;
line-offset: @rdz17_path;
[can_bicycle='designated'] {
line-offset: @rdz17_path/2 + @rdz17_cycle/2;
[oneway='no'][oneway_bicycle='no'] {
line-width: @rdz17_path; line-offset: @rdz17_path/2 + @rdz17_cycle*1.5/2;
}
}
[zoom>=18] {
line-width: @rdz18_path;
line-offset: @rdz18_path/2 + @rdz18_cycle/2;
[oneway='no'][oneway_bicycle='no']{
line-width: @rdz18_path; line-offset: @rdz18_path/2 + @rdz18_cycle*1.5/2;
line-offset: @rdz18_path;
[can_bicycle='designated'] {
line-offset: @rdz18_path/2 + @rdz18_cycle/2;
[oneway='no'][oneway_bicycle='no']{
line-width: @rdz18_path; line-offset: @rdz18_path/2 + @rdz18_cycle*1.5/2;
}
}
}
}
Expand Down Expand Up @@ -3301,7 +3308,7 @@
line-color: @mixed-cycle-fill;
#tunnel { line-color: lighten(@mixed-cycle-fill, 10%); }

[segregated='yes'] {
[segregated!='no'] {
line-color: @cycle-fill;
#tunnel { line-color: lighten(@cycle-fill, 15%); }
}
Expand Down