[OSM-dev] Blank Tiles at z23 and Deeper

Kai Krueger kakrueger at gmail.com
Wed Oct 10 09:11:10 BST 2012


mod_tile by default uses a "directory hash" which mixes X and Y coordinates
into a 40 bit "hash function" and then splits that into a 5 level deep
directory structure.

Why it normally breaks only at Z23 and not at Z21 I am not entirely sure,
but possibly if you look at Australia, it might already break in Z21,
whereas Alaska might still work in Z23 (because it simply cuts of zero
padding).

So for Z30 to work, you will either need to extend the directory hash
function to 60 bits, or you use the non hashed directory structure.

The appropriate function is xyz_to_path in dir_utils.c (
https://github.com/openstreetmap/mod_tile/blob/master/dir_utils.c#L68 )

Kai 


jpk wrote
> On Tue, Oct 9, 2012 at 10:21 AM, Frederik Ramm <

> frederik@

> > wrote:
>> Hi,
>>
>> On Tue, 9 Oct 2012 00:21:25 -0400
>> jpk <

> _@

>> wrote:
>>> In any case, I set up my tile server for
>>> this purpose.  I changed the #define MAX_ZOOM to 30 in mod_tile's
>>> render_config.h, and set MAXZOOM in renderd.conf to 30.  That's enough
>>> to get the tile server to serve tiles down to z30 instead of 404'ing.
>>
>> But the directory structure used to store the metatiles supports only 20
>> bits for x and y, so i would expect that on z21 and above you'll not be
>> able to retrieve tiles from your server (or maybe see the same tile
>> not matter what coordinates you use)... or are you using someting other
>> than mod_tile?
>>
>> Bye
>> Frederik
>>
>>
>> _______________________________________________
>> dev mailing list
>> 

> dev@

>> http://lists.openstreetmap.org/listinfo/dev
> 
> I am indeed using mod_tile (r28702).
> 
> Here's what I'm seeing at z17, 19, 20, 21, 22, and 23.  So you can see
> 21 and 22 are working.  All tiles at zoom levels 23 and greater,
> though, are that solid green-ish color.
> http://imgur.com/a/qCXAx#0
> 
> Although, you may be on to something.  Can you elaborate on "the
> directory structure used to store the metatiles supports only 20 bits
> for x and y"?  I see in /var/lib/mod_tile there are directories that
> look like the correspond to zoom levles, but stuff that doesn't look
> like x/y directories (like if you generate some tiles with gdal2tiles
> or a similar tool). The mod_tile README talks a little bit about the
> directory structure, and the limitations of using the z/x/y.png
> structure, but I'm still not sure what's going on there and what would
> break at higher zoom levels.
> 
> Thanks!
> jpk
> 
> -- 
> john p. kiffmeyer
> 
> _______________________________________________
> dev mailing list

> dev@

> http://lists.openstreetmap.org/listinfo/dev





--
View this message in context: http://gis.19327.n5.nabble.com/Blank-Tiles-at-z23-and-Deeper-tp5729539p5729724.html
Sent from the Developer Discussion mailing list archive at Nabble.com.



More information about the dev mailing list