-
Notifications
You must be signed in to change notification settings - Fork 44
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
Render path with bicycle=designated almost as a cycleway and segregated as a cycleway #184
Changes from all commits
8fab5c9
4e9d4ac
72c0c3a
18ec133
1c83299
f19f8b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -518,6 +518,18 @@ Layer: | |
WHEN access='no' AND (bicycle IS NULL OR bicycle='no') THEN 'no' | ||
ELSE NULL | ||
END AS can_bicycle, | ||
CASE | ||
WHEN bicycle IN ('designated') THEN 'yes' | ||
ELSE NULL | ||
END AS designated, | ||
CASE | ||
WHEN tags->'segregated' IN ('yes') THEN 'yes' | ||
ELSE 'no' | ||
END AS segregated, | ||
CASE | ||
WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand the question. |
||
ELSE 'no' | ||
END AS oneway_bicycle, | ||
tags->'ramp:stroller' AS ramp_stroller, | ||
tags->'ramp:bicycle' AS ramp_cycle, | ||
tags->'ramp:wheelchair' AS ramp_wheelchair, | ||
|
@@ -627,6 +639,18 @@ Layer: | |
WHEN access='no' AND (bicycle IS NULL OR bicycle='no') THEN 'no' | ||
ELSE NULL | ||
END AS can_bicycle, | ||
CASE | ||
WHEN bicycle IN ('designated') THEN 'yes' | ||
ELSE NULL | ||
END AS designated, | ||
CASE | ||
WHEN tags->'segregated' IN ('yes') THEN 'yes' | ||
ELSE 'no' | ||
END AS segregated, | ||
CASE | ||
WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
ELSE 'no' | ||
END AS oneway_bicycle, | ||
tags->'ramp:stroller' AS ramp_stroller, | ||
tags->'ramp:bicycle' AS ramp_cycle, | ||
tags->'ramp:wheelchair' AS ramp_wheelchair, | ||
|
@@ -778,6 +802,18 @@ Layer: | |
WHEN access='no' AND (bicycle IS NULL OR bicycle='no') THEN 'no' | ||
ELSE NULL | ||
END AS can_bicycle, | ||
CASE | ||
WHEN bicycle IN ('designated') THEN 'yes' | ||
ELSE NULL | ||
END AS designated, | ||
CASE | ||
WHEN tags->'segregated' IN ('yes') THEN 'yes' | ||
ELSE 'no' | ||
END AS segregated, | ||
CASE | ||
WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
ELSE 'no' | ||
END AS oneway_bicycle, | ||
tags->'ramp:stroller' AS ramp_stroller, | ||
tags->'ramp:bicycle' AS ramp_cycle, | ||
tags->'ramp:wheelchair' AS ramp_wheelchair, | ||
|
@@ -1987,8 +2023,7 @@ Layer: | |
ELSE 'no' | ||
END AS oneway, | ||
CASE | ||
WHEN tags->'oneway:bicycle'='no' THEN 'no' | ||
WHEN tags->'oneway:bicycle'='yes' THEN 'yes' | ||
WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
WHEN tags->'cycleway' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') | ||
OR tags->'cycleway:both' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') | ||
OR tags->'cycleway:left' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') | ||
|
@@ -2023,9 +2058,12 @@ Layer: | |
USING (highway) | ||
WHERE highway IN ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', | ||
'tertiary_link', 'residential', 'unclassified', 'road', 'service', 'pedestrian', 'raceway', 'living_street', 'construction', 'cycleway', 'path') | ||
AND (name IS NOT NULL | ||
AND ( | ||
name IS NOT NULL | ||
OR oneway IN ('yes', '-1') | ||
OR junction IN ('roundabout')) | ||
OR tags->'oneway:bicycle' IN ('yes', '-1') | ||
OR junction IN ('roundabout') | ||
) | ||
ORDER BY | ||
z_order DESC, -- put important roads first | ||
CASE WHEN layer~E'^\\d+$' THEN layer::integer ELSE 0 END, -- put top layered roads first | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to have an
is_primary_bike
value exported in the SQL output and filter on this one. This one, we could also account for somebicycle=designated
cases or roads without motor traffic.Might also be better in terms of Mapnik XML file size / etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_primary_bike for what tags combination ?