[OSM-talk] Mapnik Improvements regarding Tunnels

Jon Burgess jburgess777 at googlemail.com
Fri Nov 30 17:04:31 GMT 2007


On Fri, 2007-11-30 at 15:56 +0000, Patrick Weber wrote:
> A) If you look at  the following Map Extract: 
> http://www.openstreetmap.org/?lat=51.42871&lon=-0.07201&zoom=16&layers=B0T
> You can see that in the Mapnik layer, the Rail Tunnel is drawn above the 
> elements that should lay over it like roads and parks. Can we have it by 
> default that Rail Tunnels are drawn on the "bottom" layer, so that other 
> elements can be drawn over it.

In this case the railway line is probably marked with tunnel=yes but has
no layer tag.

I have just added an implicit rule into the mapnik osm2pgsql processing
so that anything with tunnel={true,yes,1} will get pushed to render
under other roads by default. We already do the equivalent to draw
anything with bridge=yes above layer 0. 

Linear features like roads will never appear underneath areas like parks
because they would otherwise be invisible.

> B) The following map extract: 
> http://www.openstreetmap.org/?lat=49.6101&lon=6.13291&zoom=17&layers=B0T
> shows a main road that becomes a tunnel in the middle section (you can 
> check by switching to T at H layer). I dont know why this doesnt become a 
> tunnel at all, again it would be great if that could get fixed.

Currently there are no Mapnik rendering styles defined for tunnelled
highways. It appears under the other minor roads in this case because it
probably has layer=-1 set. I think Steve Chilton is working on adding
the tunnel styles but there are an awful lot of road styles which need
duplicating.

	Jon






More information about the talk mailing list