[Tagging] Transportation center that serves both buses and trains?

yvecai yvecai at gmail.com
Sun Apr 24 23:42:27 BST 2011


On 24. 04. 11 23:24, Richard Welty wrote:
> On 4/24/11 5:11 PM, yvecai wrote:
>> On 24. 04. 11 21:32, Paul Johnson wrote:
>>> On 04/21/2011 08:15 PM, Nathan Edgars II wrote:
>>>> Using both railway=station and amenity=bus_station gives two labels in
>>>> Mapnik. I reported this as a bug but apparently it's not fixable:
>>>> http://trac.openstreetmap.org/ticket/3478 What should be done?
>> There is certainly a way to find a rule in the Mapnik sytlesheet to 
>> sort this 'issue', but is there an issue here? The name is rendered 
>> as a bus station AND as a rail station. That's an interesting 
>> information, no?
> wontfix/"Can't see a way to filter to say if double-tagged only label 
> once"
> is what was indicated when Nathan's ticket was closed. not exactly the
> same thing.
Please note that I am not related to the team maintaining the slippymap 
stylesheet. Also, this post should go to dev or mapnik-user list.

In the actual stylesheet, If an element is tagged as 
amenity=bus_station, its name is rendered light blue[1], and if an 
element is tagged railway=station, its name is rendered 'railway' blue[2].
These are two separate rules that apply successively on the same element 
(on distinct layers), hence the two labels.
To avoid that, the stylesheet rules should be changed to something like:
1. if an element is tagged as amenity=bus_station AND NOT 
railway=station, its name is rendered light blue,
2. if an element is tagged as railway=station AND NOT 
amenity=bus_station, its name is rendered 'railway' blue,
and a new rule:
3. if an element is tagged as railway=station AND amenity=bus_station, 
its name is rendered 'choose your nuance here' blue.

I understand the 'won't fix' fairly well, because this would be a lot of 
rules to add in the stylesheet to cope with all possible double-tagging 
(and triple, quadruple, ...), not only for buses and train. Hard to find 
a general way to deal with that, and to take the decision which tag 
takes the precedence.

Where the actual stylesheet is well done, is that the railway station 
label is displaced 10 pixels upward, and the bus station label 9 pixels 
downward, so we can see both and know that there is both a bus and a 
railway station there.
It seems that mapnik does not allow such displacements for icons 
(pointsymbolizer) though. However, the bus_station icon is specified 
with allow_overlap="false" [3], I'm not sure what it would look likes 
without.

Yves

[1]http://trac.openstreetmap.org/export/25892/applications/rendering/mapnik/osm.xml, 
line 924
[2]http://trac.openstreetmap.org/browser/applications/rendering/mapnik/inc/layer-amenity-stations.xml.inc
[3]http://trac.openstreetmap.org/browser/applications/rendering/mapnik/inc/layer-amenity-points.xml.inc



More information about the Tagging mailing list