[Tagging] Tunnels and bridges

Peter Wendorff wendorff at uni-paderborn.de
Fri Feb 1 13:08:06 GMT 2013

Am 01.02.2013 13:30, schrieb Martin Koppenhoefer:
> 2013/2/1 Pieren <pieren3 at gmail.com>:
>> And you don't fix the rendering issue because Mapnik will
>> continue to draw one bridge per highway.
> this will entirely depend on your rendering style, it is not a mapnik issue.
and it might be a non-issue:
without rendering the bridge it's none - everything keeps the same as 
before if you ignore the polygon.
with rendering the bridge in the right position at the rendering 
layer-stack, it will be correct, as long as no 
transparent/semi-transarent bridge-area-fill is used:
- draw bridge way
- draw bridge area
- draw highway

I didn't look into the code, but it looks like it's done this way 
already (without the bridge area drawing of course), compare some 
bridges as examples:

the way I propose above would
- hide the bridge way if and only if there's a bridge area
- keep the old style if there's no bridge area
>> To avoid the duplicate rendering, we need the "bridge" tag only on the
>> polygon. But then, the rendering software will have to decide to draw
>> the polygon itself.
Not necessarily, see above.
> also, you would have to do more complex analysis this way because
> areas are commonly rendered with their real width while highways are
> rendered with augmented width (the lower the zoom level the more). So
> for a bridge in (e.g.) zoom 15 you would have to take care that the
> bridge outline isn't hidden underneath the rendered road.
let's look deeper into it:
case 1: the "legacy style" (road with bridge casing) is painted thinner 
than the bridge areas "width". That's the case you don't refer to here, 
but it's the easiest case as it's the one I described above: the old 
bridge casing is completely hidden behind the bridge area, everything is 
case 2: the "legacy style" of at least one bridge highway is painted 
that wide that it's outer line(s) is/are outside of the bridge area 
(including casing).
This way the "legacy style"s bridge casing is visible where the bridge 
area or it's casing is drawn on top of it, and the bridge area is 
covered by the highway on top.

To summarize:
If the bridge outline is hidden underneath the rendered road, the old 
bridge casing is not hidden (as it's per definition outside of the 
rendered road). Therefore it's not a problem.


More information about the Tagging mailing list