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

Ulf Lamping ulf.lamping at web.de
Thu Nov 1 13:56:51 GMT 2007


Tom Hughes schrieb:
> 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. 
When I add such stuff to an xml file (I've done a similiar approach with 
JOSM's mappaint plugin) I have a look which features are similiar, have 
a look at how they do it in the xml and then think about why it's that 
way. Maybe I take the same way of doing things and maybe I take a 
different approach - but I have a look at the xml file first (and not 
the map!).
> There is no reason at all to care about the scale
> at that point.
>
> The current situation is (IMHO) a barrier to entry 
NO!!! The real entry barrier is a lot of people with IMHO strange 
opinions how things should be. I remember something like: "We don't want 
to have too much details in the map - even at zoomlevel 17" is one of 
the reasons that completely drove me away from doing anything in the 
osmarender / mapnik regard. We don't want to have several different maps 
at osm.org (which I agree because of maintenance effort and processing 
power) but we also don't want to have that level of detail on the osm 
map - so how do we show to other users all the data osm already provides?

Interestingly, after I've added most (all?) of the map features into 
JOSM's mappaint (and also using the Validator plugin), I *very* rarely 
look at the map at all. Lot's of the stuff I add - although correct - 
won't even appear on the map and most problems I actually see are 
usually things missing in the rendering rules (or just rendering bugs) 
and not bugs in the data. I just cannot depend on the map to check that 
I've added anything that I've wanted. So looking at the map for me is to 
show/see nice pictures but not to actually work with the data.

And I don't tend to add stuff to the map xml file(s), because of the 
disappointing answers when I first asked (months ago) - see above.


So the barrier for me is not the xml syntax (being it scale or 
zoomlevel), but the annyoing discussions that usually appear. If there's 
a real agreement that mapnik should show all amenities from map features 
at zoom level 17 (or scale whatever) this could be done in a very short 
time. The problem is: Such an agreement is *not* possible IMHO.

Unfortunately, the current state of the art as I see it is: changing the 
xml - in a lot of tiniest steps - towards a mostly unknown direction ...
> 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.
>   
This can only happen for two reasons:
1) There is a scaling reason for these differences
2) Someone changed it and didn't care to keep the rules consistent (or 
just don't understand the file at all)

This only highlights the problems we currently have in editing these 
files in tiniest steps - with no real maintainer (team?).
> 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?
>   
Your seem to be "addicted" to how OSM is currently doing it with mapnik 
and osmarender ;-)

There are other projects (e.g. gpsdrive) that take the osm xml file(s) 
as a basis for their work. And that projects will have very certainly 
different zoomlevels than what osm currently has. Using zoomlevels 
instead of scales will make it more difficult for them.

Oh yes, I forgot the usual OSM answer: it's their problem and not ours 
... ;-)))

Regards, ULFL

P.S: Some time ago, I took a deep look at the mapnik and osmarender xml 
files. The mapnik file looks ok and the osmarender files (BTW: there are 
far too much of them) looked like a hideous ugly hack that desperately 
needs a cleanup. So going the"osmarender way" is not the way I would 
like to go ...




More information about the dev mailing list