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

Dave Stubbs osm.list at randomjunk.co.uk
Thu Nov 1 14:28:02 GMT 2007


On 01/11/2007, Ulf Lamping <ulf.lamping at web.de> wrote:
> 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!).


That's all fine if you are trying to display data. If you're trying to
create a nice looking map then failing to look at it causes problems.
You don't seem to be distinguishing between the two activities.


> > 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?

??!
There's certainly been a general dislike of putting /everything/ onto
the tiles. It's excessive for a general purpose tile-set. The correct
way to do this is create speciality tile-sets which represent some
interest.
That doesn't mean adding stuff to be rendered is banned, it just means
you should take care and make it look good and not too much of a mess.


>
> 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.

Bingo. Maps are pretty pictures that represent the world. Ugly maps
are counter-productive. If you want a map for a particular purpose,
make a pretty map just for that.

>
> 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.

Yes, that agreement is probably not possible.

>
> 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)

Probably 2). They probably just tweaked the value till it appeared on
the zoom level they wanted. ie: if they could have just typed in the
zoom level they wanted it would have been OK.

>
> 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.

To do what exactly?
There is no way an online tile renderer is going to be sharing rules
with a GPS. For a start you are probably going to want to use some
completely different data.
Trying to harmonise this is probably a waste of time.

>
> 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 ...

>From such a deep look you seem to be making randomly sweeping generalisations.

All the suggestion that was made is intending to do is be able to
write something like "z13" rather than some "arbitrary" number. I
think that is a great idea.




More information about the dev mailing list