[OSM-talk] Rendering name of route relations

Jon Burgess jburgess777 at googlemail.com
Fri Jul 18 19:49:02 BST 2008


On Fri, 2008-07-18 at 19:00 +0100, Andy Allan wrote:
> On Fri, Jul 18, 2008 at 6:07 PM, Gervase Markham <gerv-gmane at gerv.net> wrote:
> > Andrew MacKinnon wrote:
> >> Recently, it appears that Mapnik has started rendering the name of
> >> relations on the map, as if they were street names. For example, it
> >> renders the name of the "Cosburn" bus route along Haldon Avenue in
> >> this map:<http://www.openstreetmap.org/?lat=43.6978&lon=-79.31117&zoom=17>.
> >> This is clearly undesirable. Could someone please fix this?
> >
> > Some relations need to have their names rendered, and some don't. (If I
> > have a street, one part of which is One Way, I have to break it into
> > three sections to add the oneway=yes. But I still want only a single
> > instance of the street name rather than two or three. I believe the
> > correct solution to this is a relation, but it would require the name to
> > be rendered in this case.
> >
> > Perhaps we need a tag for an identifying string for a relation, which is
> > not supposed to be rendered?
> 
> Umm, no. That would be the wrong way round. What we need is to
> carefully process relations individually and only render the stuff you
> deliberately want to render.
> 
> I think the problem here is that the relations are being unwound into
> ways, and the mapnik elsefilter on polylines is picking it up.

Right, it looks like they are getting rendered by the ElseFilter in the
roads-text style 

> But the problem would be why the relations are being processed when
> they aren't intended to render. I don't render the names of bus route
> relations on the cycle map, despite it rendering cycle route
> relations.

The change this week is that I'm using the osm2pgsql code ins 'slim'
mode which is including relations that would have been discarded before.
The ways of the relation are getting into the planet_osm_line table
marked with the tags: route=bus, name=Cosburn.

The fix is probably to remove the generic ElseFilter from roads-text but
we need to check if this will break anything else.

	Jon






More information about the talk mailing list