<div class="gmail_quote">On Wed, Oct 10, 2012 at 4:15 PM, Jon Burgess <span dir="ltr"><<a href="mailto:jburgess777@gmail.com" target="_blank">jburgess777@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Wed, 2012-10-10 at 11:08 -0400, jpk wrote:<br>
> The hash directory thing is good, and I can get that sorted (yay,<br>
> progress!), but it doesn't explain all the sea-colored tiles at >=z23<br>
> for tiles that aren't yet cached.  From what I gather looking at<br>
> mod_tile/renderd source, I see mapnik render the tile first, based on<br>
> the z/x/y coordinates, and then the hashing and caching stuff happens<br>
> after.  Is that right?  If so, it would seem that the problem lies<br>
> somewhere in there.  Any pointers as I start looking in that<br>
> direction?<br>
><br>
<br>
</div>At zoom 23 the world dimensions are 2^23 * 256 pixels, or 2^31. Any<br>
calculation done on these pixel values with signed 32 bit arithmetic has<br>
a risk of overflowing or changing sign by accident.<br>
<br>
I cannot tell you where this limitation occurs. If you really want to<br>
fix it then you could use a debugger to see where things go wrong. Or<br>
you could try compiling mod_tile and Mapnik with the GCC the -ftrapv<br>
option which should trap any signed integer overflow.<br>
<span class="HOEnZb"><font color="#888888"><br>
    Jon<br></font></span></blockquote><div><br></div><div>Ah, the number 23 seemed odd to me until now, but this makes sense.</div><div><br></div><div>Relatedly, I've been playing with Mapnik and so far haven't run into problems getting toy stuff to render down to z30, so I suspect the interesting stuff related to my blank tiles is happening in mod_tile/renderd.  Anyway, I plan to dig into that next chance I get.</div>

<div><br></div><div>If I get something working and want to share patches, should I post them here on dev@ or is there a better place?</div><div><br></div><div>-jpk</div></div><br clear="all"><div><br></div>-- <br>john p. kiffmeyer<br>