[Tilesathome] Lowzoom Place Labels displaced

Frederik Ramm frederik at remote.org
Sat Sep 20 00:09:07 BST 2008


Hi,

(Management overview: New or/p in SVN. Check it out.)

Frederik Ramm wrote:
>    I'm currently looking into this whole caption tile generation 
> stuff... but is it possible that nobody ever tried lowzoom with the 
> current client?

Ok, I took the following tile as a test case:

http://a.tah.openstreetmap.org/Tiles/tile/10/534/345.png

It is obviously broken as it is now, Mapnik hast the label positions right:

http://c.tile.openstreetmap.org/10/534/345.png

So, after fixing Tileset.pm to allow the creation of caption tiles (not 
commited as it was an ugly hack - someone do it right please), I first tried

perl tilesGen.pl xy 534 345 10

which created a correct label tile. Then I did the corresponding

perl tilesGen.pl xy 33 21 6

and this created, among others, the same tile, just wrong by about 10 
kilometres.

A quick calculation shows us that the "Osmarender error" (resulting from 
choosing 1/cos(middle latitude) of a tile for projecting all of it 
instead of applying this formula to every latitude) would be in the 
range of up to +/- 6% for a Z6 tile in the 50°N area, yielding an error 
of up to 15km - that roughly matches what we're seeing above.

The error gets larger in a super-linear fashion if you look at smaller 
zoom levels (higher percentage of a higher value), although I cannot 
quite imagine it becoming so big that Rome would be placed in Finland 
(or "hell freezes over" as some would have it!).

I would actually like to modify orp.pl to use the Proj.4 library, then 
it could support any projection you want. But for the mean time I have 
applied a patch that was sent to me by Alfons Andorfer a long time ago 
which makes orp.pl use a correct Mercator projection.

(It took me about 20 attempts to get valid data from OsmXAPI today, all 
the other attempts were simply cut off somewhere in the middle... at a 
different point every time.)

It seems to work now. This is the level 10 caption tile generated now:

http://www.remote.org/frederik/tmp/test1.png

and this is what it was before the or/p fix:

http://www.remote.org/frederik/tmp/test2.png

Committed or/p fix.

I'm too lazy now to render a normal Z12 tile with old and new methods 
and compare whether they still look the same - if someone else wants to 
do that...

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"




More information about the Tilesathome mailing list