[OSM-dev] osm.xml/osm-template.xml: MinScaleDenominator causing tracks invisible in larger zoom

Jon Burgess jburgess777 at googlemail.com
Sun Oct 12 13:17:41 BST 2008

On Sun, 2008-10-12 at 13:48 +0200, Thomas Herzog wrote:
> Am 11.10.2008 um 13:35 schrieb Jon Burgess:
> > On Sat, 2008-10-11 at 08:43 +0200, Thomas Herzog wrote:
> >> Hi all,
> >>
> >> is this correct in osm-template.xml?
> >>
> >> <Filter>[highway] = 'track'</Filter>
> >>     <MaxScaleDenominator>100000</MaxScaleDenominator>
> >>     <MinScaleDenominator>50000</MinScaleDenominator>
> >>
> >> Zooming in, mapnik renderings display tracks and cycleways at first  
> >> at
> >> the same level and then zooming in on tracks disappear.
> >>
> >> This seems odd...cycleway rule has no MinScaleDenominator (and I  
> >> don't
> >> see any sense in hiding tracks at higher zoom...)
> >
> > At <50000 they should be rendered by a set of rules which use a
> > different style depending on: tracktype, bridge & tunnel:
> >
> > http://trac.openstreetmap.org/browser/applications/rendering/mapnik/osm-template.xml#L2817
> >
> > Can you give a permalink to an example where they disappear?
> Hi Jon,
> I am using current svn version of osm-template.xml, there is the  
> following section:

[ paste of osm-template.xml removed ]

> I don't have a permalink, as I am rendering on my own box currently.

If you can not reproduce this on the main map then I suggest that the
problem may be local to your setup and not with the style itself.

I suspect your problem may instead be with your data import. Do you have
a column named 'tracktype' in your database? Check that you are
importing the data with an up-to-date copy of osm2pgsql with the current

> Seems like this rule taking over "tracks" at 50.000 scale is simply  
> missing...

Perhaps you are getting confused because the other rules for rendering
tracks do not mention highway=track in the <filter> line. Instead there
are special layers for each of the track/tunnel/bridge combinations, for
example the layer "tracks-notunnel-nobridge": 


In particular notice that the select line contains: 
	... where highway='track' ...

This means that we can render tracks with this layer without needing any
explicit filter in the style. This is more efficient since Mapnik does
not need to fetch information from the database that it later discards.


More information about the dev mailing list