[OSM-dev] Blank Tiles at z23 and Deeper

Jon Burgess jburgess777 at gmail.com
Wed Oct 10 21:15:16 BST 2012


On Wed, 2012-10-10 at 11:08 -0400, jpk wrote:
> The hash directory thing is good, and I can get that sorted (yay,
> progress!), but it doesn't explain all the sea-colored tiles at >=z23
> for tiles that aren't yet cached.  From what I gather looking at
> mod_tile/renderd source, I see mapnik render the tile first, based on
> the z/x/y coordinates, and then the hashing and caching stuff happens
> after.  Is that right?  If so, it would seem that the problem lies
> somewhere in there.  Any pointers as I start looking in that
> direction?
> 

At zoom 23 the world dimensions are 2^23 * 256 pixels, or 2^31. Any
calculation done on these pixel values with signed 32 bit arithmetic has
a risk of overflowing or changing sign by accident. 

I cannot tell you where this limitation occurs. If you really want to
fix it then you could use a debugger to see where things go wrong. Or
you could try compiling mod_tile and Mapnik with the GCC the -ftrapv
option which should trap any signed integer overflow.

    Jon










More information about the dev mailing list