[OSM-talk] High Road - pre-cooked Postgres views for rendering OSM roads

Michal Migurski mike at stamen.com
Wed Sep 7 17:13:33 BST 2011


On Sep 7, 2011, at 6:55 AM, Peter Wendorff wrote:

> Am 07.09.2011 14:51, schrieb Ilya Zverev:
>> Hi!
>> 
>> Did you consider (or are you planning to) joining named ways, so segmenting roads won't have any effect on rendering labels? komap.py of Kothic library does that, for example. This is also a task for PostGIS, so it could be included in HighRoad.
> I'm not speaking for Stamen, but keep in mind, that the joining you propose restricts the usage, if it's not possible to define a set of separating tags.
> 
> Consider a primary road that switches to a secondary or tertiary while keeping the same name.
> (e.g. in Germany) that could happen in cases where a old, named street crosses a town and there is a new bypass road build to circumvent too much traffic in the town.
> In this case the street could keep the same name crossing the town, but collapsing it would lead to wrong rendering results, as the tags would have to be unified.

Not necessarily - you don't have to use the same layer to draw the labels and render the roads:

             West Grand Ave.             Grand Ave.
Labels: -------------------------o----------------------------
Lines:  -----o-------------o-----o--------o-------------------
                 bridge      sec.   prim.        tunnel

(monospaced font, there)

This is probably preferred anyway, since Mapnik's rendering rules require to draw the lines in the opposite order to the labels. Painter's algorithm for the lines means you draw the most importance streets last, while the internal label mask means you label the most important streets first. This kind of thing really needs to be applied all-at-once to a large dataset, because it can really mess with tile boundaries when done at render-time. Don't even get me started on dual carriageways. =)

Andy Allan if you're reading, do you do the spatial merging of bus stops and such from your cartography talk at render-time?

-mike.

----------------------------------------------------------------
michal migurski- mike at stamen.com
                 415.558.1610



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20110907/0497d3e1/attachment-0001.html>


More information about the talk mailing list