[OSM-dev] Units in the Mapnik .xml file?

Tom Hughes tom at compton.nu
Thu Nov 1 12:38:50 GMT 2007


In message <4729BE79.7000207 at web.de>
        Ulf Lamping <ulf.lamping at web.de> wrote:

> In order to understand what these values really mean, IMHO it's a lot
> better to use scale values than the really arbitrary zoom levels (I
> know that they depend on DPI). When I had a look at the *various* ways
> people keep that kind of values in some xml file (mapnik, osmarender,
> mappaint, ...), I had at least an idea what the values meant in the
> mapnik file, but *no idea* what the different zoomlevels of osmarender
> really mean.
>
> I had a "deep look" at both osmarender and mapnik xml file, and to me
> the way mapnik is doing it seemed to be a lot better (e.g. osmarenders
> spreading settings across several files is an invitation for
> inconsistencies like different icons in different zoom levels for the
> same thing - which already appeared in reality).

I don't dispute that scale is the right thing for mapnik as a whole
but as somebody who has actually made changes to the stylesheet I can
tell you that zoom is the only thing you're interested in when adding
things to the OSM style sheet for mapnik.

Typically you will be looking at a sample section of map in your
browser and saying to yourself "that's about the right point to
start rendering X" so then you and look to see what zoom you're at
and go and add it. There is no reason at all to care about the scale
at that point.

The current situation is (IMHO) a barrier to entry in that when you
first look at the stylesheet you have idea which rules have effect at
which zoom levels - the fact that there are multiple scale values used
to effectively mean the same thing means you can't even compare two
rules to see if they have effect at the same zoom or not.

Other than having some sort of theoretical ability to compare with a
paper which has a scale, what is the advantage of writing rules in
terms of scale rather than zoom?

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list