[Tilesathome] Molten Ice caps ?

Nic Roets nroets at gmail.com
Thu May 24 09:13:24 BST 2007


I see Pretoria is now surrounded with 404 sea squares.

I understand that there's a bit of an open problem regarding how to write a
fast 404 handler that can generate correct sea / land squares. So here's my
proposal :
We create a run length encoding of the land areas at the highest feasible
zoom level, say 17. The direction in which we run is fixed, say horizontal.
This encoding can be represented as a set of vectors (x1,y)->(x2,y) or more
compact as a set of tripples (x,y,length) and stored in a flat file. We sort
the file by y and where they are equal, by x. This file can be generated
offline.

The 404 handler opens the file and does a binary search with the (x,y) it's
interested in and determine if it falls in a land interval.

Lower zoom level 404s can either check the center of the tile they're
interested in or have their own file which will be much smaller than the z17
file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20070524/3540e673/attachment.html>


More information about the Tilesathome mailing list