posm / posm-carto

A simple CartoCSS style for POSM, highlighting HDM features.
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Make roads wider at high zooms #7

Closed mojodna closed 8 years ago

mojodna commented 8 years ago

Particularly noticeable at z21, but likely useful to make them wider at lower zooms.

The specific experience that we had with road widths was that volunteers would annotate the printed maps with arrows indicating that buildings should be moved closer to the road, since it was probably the equivalent of a foot or so wide.

almccon commented 8 years ago

From @aawiseman:

aawiseman commented 8 years ago

Word up

almccon commented 8 years ago

So I did something that I've always wanted to try: from zoom 18 onward (up to 22) I double with z18 widths of the roads. So whatever the real world width of the lines that are drawn at zoom 18 are the same real world widths in the deeper zooms.

Of course, we don't actually know the widths of any of these roads, and surely a highway=residential in one part of the world may be much narrower in the real world than the same class of feature in some other part of the world. So I was fairly conservative with the effective real world dimensions I chose. So, for highway=residential the width is 7 pixels at z18, which works out to about 4 meters wide. (At z18 at the equator, one pixel is about 0.6 m)

z18: screen shot 2016-04-21 at 21 apr 4 46 21 z19: screen shot 2016-04-21 at 21 apr 4 46 39 z20: screen shot 2016-04-21 at 21 apr 4 46 59 etc...

There are some cases where buildings overlap the roads (which is inevitable for urban areas that might have very narrow roads that are legitimately tagged as residential) but in the very worst cases, I think this is because the building data is wrong. So I added a semi-transparent building layer on top of the roads (in addition to the full opacity buildings that are under the roads layer). Hopefully this helps with QAing the building data.

For example, this spot which has a lot of building overlap, looks from the satellite layer that the problem is with the buildings, not the roads.

screen shot 2016-04-21 at 21 apr 4 49 33 screen shot 2016-04-21 at 21 apr 4 50 06 http://www.openstreetmap.org/edit#map=20/-3.48342/-80.24375

Thoughts, @aawiseman @dalekunce?

dalekunce commented 8 years ago

@almccon that looks awesome.

road width feature will be highly useful.

almccon commented 8 years ago

Ok, I'm going to merge it in to master so it's easier for you all to test. Let me know how it goes!

almccon commented 8 years ago

full width zoom