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

Forbidden roads hides possible bike paths (allowed roads) #600

Open
tdelmas opened this issue Sep 28, 2021 · 2 comments
Open

Forbidden roads hides possible bike paths (allowed roads) #600

tdelmas opened this issue Sep 28, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@tdelmas
Copy link

tdelmas commented Sep 28, 2021

Roads forbidden to bikes (in gray) may be rendered over roads accessible and hide them. Especially at junctions.

Example :

https://www.openstreetmap.org/#map=19/48.86188/2.29295&layers=Y

image

Would be better if the road in gray was under, so the possible path at the junction is visible.

Same place, different zoom :

image
now the forbidden road almost hide the allowed one in the bottom

Another place:

Render ok:
https://www.openstreetmap.org/#map=19/48.83736/2.37728&layers=Y
image

Render not ok:
https://www.openstreetmap.org/#map=20/48.83724/2.37742&layers=Y
image

@Phyks
Copy link
Member

Phyks commented Sep 30, 2021

Would be better if the road in gray was under, so the possible path at the junction is visible.

Which OSM object is the "possible path at the junction"? In particular, see the same place at lower zoom level (https://www.openstreetmap.org/#map=15/48.8621/2.2939&layers=Y), the bicycle path is drawn on top of the primary road, not masked by it.

Regarding your second example and the inversion of overlap between zoom levels, both branches are highway=primary so they get the same z-order (overlapping precedence): z_order is only defined by the value of the highway tag in osm2pgsql (https://github.com/openstreetmap/osm2pgsql/blob/17ddb99a6a2d48bc47cdad69202e888aba92a385/src/tagtransform-c.cpp#L27-L55).

CyclOSM conditionally overloads this z_order value to ensure cycle roads are on top: https://github.com/cyclosm/cyclosm-cartocss-style/blob/master/views.sql#L169-L173.

We could add extra conditions there to ensure consistent ordering of same highway value with different colors (blue and grey here), this would basically fix your second example. It would require a bit of measurement to ensure correct performances, but this is easily doable and I'll be happy to merge any PR implementing this.

@Phyks Phyks added the good first issue Good for newcomers label Sep 30, 2021
@tdelmas
Copy link
Author

tdelmas commented Sep 30, 2021

the bicycle path is drawn on top of the primary road, not masked by it.

Yes, where there is a bicycle path, it's correct, the problem is only between similar roads, one with bike allowed and the other not.

We could add extra conditions there to ensure consistent ordering of same highway value with different colors (blue and grey here), this would basically fix your second example.

I think yes, it will be better when two roads are similar and one allows bike and the other one not, to draw the one that allows them over the other, so cyclists can see the path they can take.

It would require a bit of measurement to ensure correct performances, but this is easily doable and I'll be happy to merge any PR implementing this.

Thank you, I hope someone familiar with the code base will find that issue interesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants