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

Render oneway roads narrower #465

Closed

Conversation

matthijsmelissen
Copy link
Collaborator

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 trunk links showing around motorways #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 #265 and #83 on Github and 1952 on trac.

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.
@matthijsmelissen
Copy link
Collaborator Author

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.

@matthijsmelissen
Copy link
Collaborator Author

I have re-instantiated round line-caps, because they are necessary to render curvy roads that consist of multiple segments.

@matthijsmelissen
Copy link
Collaborator Author

The width of link roads will be handled after #462 has been implemented.

@gravitystorm
Copy link
Owner

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.

@Rovastar
Copy link
Contributor

Rovastar commented Apr 9, 2014

@gravitystorm
I don't understand your logic.
Are you saying dual carriageways (trunks, primary,etc) that have a physical separation are in wider than normal trunk roads without?!
Often (nearly always) these case is they are not. Say a 2 lane dual carriage way with physical separation so 2 one way roads. This would be the equivalent of a 4 lane both direction road where there is no separation.

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.

@gravitystorm
Copy link
Owner

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?

@matthijsmelissen
Copy link
Collaborator Author

My first concern is - why?

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:

  1. The two sides of the dual carriage way will overlap. That does not look very pretty. Note that the motorway looks much cleaner.
  2. If the two sides of the dual carriage way overlap, the dual carriageway looks wider than a single carriageway (because it consists of two sides and is rendered twice), while the dual carriageway is not necessarily more important.

Hence my assertion that a carriageway in a dual-carriageway is more likely to be wider than a normal road.

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; }
Copy link
Contributor

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-*

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected now.

@gravitystorm
Copy link
Owner

I've kept thinking about this, but I believe the increased complexity to the stylesheets means it's not worth it.

@matthijsmelissen matthijsmelissen deleted the oneway-widths branch May 21, 2014 13:19
@Rovastar
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

Consistent road widths on all zoom levels
4 participants