Opened 10 years ago

Closed 4 years ago

#936 closed enhancement (duplicate)

railway=tram does not render on roads tagged with bridge=yes with Mapnik

Reported by: lakeyboy Owned by: mapnik-team@…
Priority: minor Milestone:
Component: mapnik Version:
Keywords: Cc:


At the moment, tagging a road with railway=tram, it will render a solid greyish line down the middle of the road, but when the road is tagged with bridge=yes and railway=tram, the bridge renders while the tram line does not. I'm not sure if this is because of conflicting code or that this type of combination is not registered by the Mapnik code.

Attachments (1)

osm.diff (2.0 KB) - added by michal@… 8 years ago.
Fix tram lines beeing drawn over every road on map

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by tom@…

  • Owner changed from tom@… to steve8@…

comment:2 Changed 10 years ago by grand.edgemaster@…

railway=tram conflicts with the highway= tag, where possible you should create a new way running over the top of the road way.
Although this may seem illogical at first (the tram runs down the road) from a data point of view, tags that apply to the road do not completely apply also to the tram.

(Plus the behaviour of using multiple top-level tags on a single object is generally undefined)

comment:3 Changed 10 years ago by steve8@…

Can you point me to an example, so I can investigate?

comment:4 Changed 10 years ago by lakeyboy

Here is an example of it in practice. Princes Bridge in central Melbourne, Australia.

comment:5 Changed 10 years ago by lakeyboy

I'll just add to this. I have also discovered that a bridge will not render even if the only tags attatched to the way are railway=tram and bridge=yes. As above, the tram line renders, but the bridge does not. Example here in St Kilda, Melbourne, Australia.

comment:6 Changed 9 years ago by rhomeo

I can confirm the bug. Another example can be found here: <> "Mittlere Bücke".

comment:7 Changed 9 years ago by steve8@…

Trams brought above all roads, so they show on the road when it goes on bridge.
However, I see from 2nd example that there needs to be an instance included of tram+bridge that is NOT on a road. Will try that later.

comment:8 Changed 8 years ago by Ldp

  • Owner changed from steve8@… to mapnik-team@…

comment:9 Changed 8 years ago by michal@…

I've made a small patch to address this issue. As I don't have R/W access to repository, I'm attaching my diff. It still keeps trams above all bridges but also solves bug with trams beeing drawn over every road on map, even over elevated ones.

Changed 8 years ago by michal@…

Fix tram lines beeing drawn over every road on map

comment:11 Changed 4 years ago by clockwerx

  • Resolution set to duplicate
  • Status changed from new to closed

Shifting to above issue. The patch is obviously a bit stale now; but the essence of it might be suitable to turn into a PR.

Note: See TracTickets for help on using tickets.