This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Does mapnik merge dual carriageways, multi-track railways and similar things?

1

When mapnik renders e.g. a dual carriageway in a scale that is zoomed out far enough that it does not make sense to render the ways separately, does it "merge" the ways before rendering, or does it just render them on top of each other, hoping that the result won't be too ugly?

(I could probably figure this out by expermimenting and/or reading code, but I am hoping that somebody can give a quick "it does/doesn't merge" off the top of his or her head. :-) )

asked 31 May '13, 13:44

turepalsson's gravatar image

turepalsson
836101625
accept rate: 25%

edited 31 May '13, 21:10

SK53's gravatar image

SK53 ♦
28.1k48268433


One Answer:

2

It does not merge the roads. In fact merging the roads would be computationally quite expensive and unlikely to be possible "on the fly". There's existing work in preprocessing data to find and merge such lines, but not for rendering - just for labelling. See https://github.com/migurski/Skeletron

answered 31 May '13, 15:32

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks for the answer, and for the link; some interesting references there!

(31 May '13, 16:49) turepalsson

Source code available on GitHub .