-
Notifications
You must be signed in to change notification settings - Fork 819
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 oneway roads narrower #465
Render oneway roads narrower #465
Conversation
Render oneway roads narrower than twoway roads for the types motorway, trunk, primary, secondary and tertiary. This is accomplished by making twoway motorways wider and oneway trunk/primary/secondary/tertiary roads narrower. More important road types are now always rendered wider than less important road types. Changes: - Twoway motorways are rendered wider - Oneway trunk/primary/secondary/tertiary roads are rendered narrower - Secondary is now narrower on z13/z14 - Tertiary_link is now rendered just like tertiary - Round line caps on tertiary and larger are removed on regular roads to prevent gravitystorm#83 All other road types are rendered as before. Further changes to the width of link roads are left for a future pull request. I tried to achieve the goal of making more important road types wider than less important ones while at the same time making as little changes to the roadsizes as possible. I think it would be worth for if someone with feeling for design has a closer look at the sizes as we have them now. It should be very easy to adapt now: one can just change the variables in the beginning of the style. I put the road sizes in a kind of table to make them more legible. If people think that's not practical, I can change it back to a list again. This pull request resolves gravitystorm#265 and gravitystorm#83 on Github and 1952 on trac.
This PR is for review only - please do not merge yet. I would appreciate it if people could look at the resulting rendering and see if there are any problems. |
I have re-instantiated round line-caps, because they are necessary to render curvy roads that consist of multiple segments. |
The width of link roads will be handled after #462 has been implemented. |
I'll have a look and see how it looks like. My first concern is - why? There are two major scenarios that spring to mind, dual-carriageways and oneway systems. I expect roads to be physically wider than 'normal' when on a dual-carriageway but perhaps narrower on oneway systems (in the UK, that is). Or are you making them narrower because they are less important when they are oneway? I need to check that the cartographic results are worth the extra complexity. |
@gravitystorm This happens for motorways too. Lets take the spaghetti junction as an example. http://www.openstreetmap.org/#map=17/52.50821/-1.87415 where there is a single way 7 or 8 lane section. But we have the same issue as the lanes where going from 1 thick to 2 narrower way. |
That's an extreme example and well known to be unique in the UK - so not a good place to base a discussion. In most places there are no 4, 6 or 8 lane unseparated roads, whereas a 2, 3 or 4 lane carriageway in a dual carriageway is normal. Hence my assertion that a carriageway in a dual-carriageway is more likely to be wider than a normal road. So my question remains, why are we considering oneway roads to be narrower than 2-directional roads? Is it even based on dual-carriageway considerations? |
This is inspired by the fact that motorways are currently rendered narrower than trunk ways. The rationale behind that was probably that motorways are (nearly always) dual carriageways, and trunk roads are (often) single carriageways. If we keep following that rationale, it would be better to look at the actual oneway tag, because there are many dual-carriageway trunk roads (alternatively, we can forget about that idea altogether, but then we probably should make motorways wider than they are currently). It seems there are two problems with rendering dual carriageways too wide:
This I don't understand. A typical dual carriageway in the Netherlands has two lanes in each direction. A typical single carriageway has one lane in each direction. I think this is similar in the UK, right? So in both cases, the osm-line contains two lanes, and will be of similar width. Of course, there are exceptions in both directions (single carriageway with three/four lanes, double carriageway with one/three lanes). But I don't think this is about 'real' width, but about the issues 1 and 2 I mentioned above. In any case, I agree that we should be critical whether this is worth the additional complexity - even when we decide not to implement it, I think my work will have been worth it, just so we can avoid the discussion in the future :). |
@@ -1012,6 +1075,12 @@ | |||
[zoom >= 13] { line-width: @secondary-width-z13 - 2 * @casing-width-z13; } | |||
[zoom >= 15] { line-width: @secondary-width-z15 - 2 * @casing-width-z15; } | |||
[zoom >= 17] { line-width: @secondary-width-z17 - 2 * @casing-width-z17; } | |||
[oneway != 'no'] { | |||
line-width: @motorway-oneway-width-z12 - 2 * @casing-width-z12; | |||
[zoom >= 13] { line-width: @motorway-oneway-width-z13 - 2 * @casing-width-z13; } |
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.
This should be secondary-oneway-width-*
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.
Thanks for catching.
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.
Corrected now.
Correct typo.
I've kept thinking about this, but I believe the increased complexity to the stylesheets means it's not worth it. |
Doing any major changing for more functionality will require more complexity. I think we should show more here. If the complexity is the only reason then maybe not at the moment then but in the future I think we should be looking at more things like this. |
Render oneway roads narrower than twoway roads for the types motorway, trunk, primary, secondary and tertiary.
This is accomplished by making twoway motorways wider and oneway trunk/primary/secondary/tertiary roads narrower.
More important road types are now always rendered wider than less important road types.
Changes:
All other road types are rendered as before.
Further changes to the width of link roads are left for a future pull request.
I tried to achieve the goal of making more important road types wider than less important ones while at the same time making as little changes to the roadsizes as possible. I think it would be worth for if someone with feeling for design has a closer look at the sizes as we have them now. It should be very easy to adapt now: one can just change the variables in the beginning of the style.
I put the road sizes in a kind of table to make them more legible. If people think that's not practical, I can change it back to a list again.
This pull request resolves #265 and #83 on Github and 1952 on trac.