Opened 11 years ago

Closed 6 years ago

Last modified 6 years ago

#2394 closed enhancement (invalid)

render highway as broken lines when under a building

Reported by: Turbodog Owned by: mapnik-team@…
Priority: major Milestone:
Component: mapnik Version:
Keywords: building highway layer Cc: bbauer


Currently highways are rendered on top of buildings, independent of relative layering. A comment was made on one bug report that this has not been changed because you would not be able to see the path taken by the highway. If this is a concern, or if the rendering sequence is such that buildings are rendered before highways, would it be possible to render the road as broken lines with transparent fill when it passes under the building? The mapper/tagger can break the road into segments so that only the segment under the building is changed if this helps the rendering process.

Change History (10)

comment:1 Changed 11 years ago by Jean-Marc Liotier

Another way to look at the problem- a railway station above the tracks :

area:yes[[BR]] building:yes[[BR]] bridge:yes layer:3

And it is not rendered above the default layer railway.

There is definitely a problem with the rendering of buildings over ways.

comment:2 Changed 11 years ago by Waldo000000

Priority: minormajor

I'm surprised that this is "minor" priority. Is it really still not possible to render ways under/through buildings? E.g. a service road through a petrol station:

Or undercover service=parking_aisle's.

The original poster said "A comment was made on one bug report that this has not been changed because you would not be able to see the path taken by the highway."

IMHO even this would be an improvement in the short-term, if it is indeed difficult to render ways as broken lines.

comment:3 Changed 11 years ago by Ldp

It is not difficult to render broken lines, but it is relatively difficult or computationally intensive to detect when a road intersects a building polygon.

You might want to look into the covered=yes tagging.

comment:4 Changed 11 years ago by Waldo000000

I don't think introducing a redundant tag in this case (e.g. covered=yes) to fix a rendering problem is the best solution. And being "relatively difficult" to fix the problem is not a valid reason against fixing the problem.

A post on the tagging list suggested "this may need to be fixed on osm2pgsql to handle this situation":

comment:5 Changed 10 years ago by stanton

As a matter of fact, covered=yes does not render as broken lines either. That, however, should not be too difficult to fix (we're doing the same for tunnels already, so why not for covered?).

As for the redundancy of covered=yes - it may be considered a "courtesy tag" to ease the work of the renderer in a fully-mapped inner city, but imagine a gallery on a mountain road, like a tunnel but open on one side. It is not really a building as it sort of blends into the territory on the uphill side, so I wouldn't draw a building outline here (where's the outline on the uphill side?). Nor is it a real tunnel - hence the tag does have a valid raison d'etre.

comment:6 Changed 9 years ago by bbauer

Cc: bbauer added

comment:8 Changed 6 years ago by math1985

Resolution: invalid
Status: newclosed

Roads like this should be tagged with tunnel=building_passage. If that is done, they will be rendered correctly. As this is a tagging issue, I will close this ticket.

comment:9 Changed 6 years ago by Jean-Marc Liotier

covered=yes is also in widespread use and it is a correct way to map this. Request for rendering it in Mapnik is

comment:10 Changed 6 years ago by math1985

Thank you for pointing that out.

Note: See TracTickets for help on using tickets.