logo separator

[mkgmap-dev] New splitter buggy

From Steve Ratcliffe steve at parabola.demon.co.uk on Mon Mar 2 21:12:29 GMT 2009

Hi

> The problem with the overlapping tiles started when decimal numbers were  
> introduced to areas.list and I recreated that file. Maybe the error is  
> connected to "bad" numbers. I created a small dataset and split that  
> automatically into two tiles: Everything fine. Then I resplit it using  
> areas.list: Still everything fine. Then I moved the border between the 
> two tiles by just one mapunit: Significant overlap between tiles occurs!
>
> It seems that tile borders can not be chosen arbitrarly but should be  
> multiples of some power of two. Does the tile splitter assume this  
> somewhere in the code or does the img-format require this?

Yes that explains it.  Tile borders should not be arbitary, but need to
match the resolution of the highest layer in the map which is the
resulution of the overview map basically.  The default value in splitter is
chosen to be suitable for the default style in mkgmap.

In AreaSplitter.java there is the symbol SHIFT which is set to 11.  So
you need the bottom 11 bits to be zero.

You could change this, but it can't be less than 8 as I make use of this
fact to save memory - I only save the top 16 bits of the coordinate in the
first pass knowing that is enough to assign them to a particular tile.

..Steve



More information about the mkgmap-dev mailing list