[OSM-dev] Proposal: Database accelerator and dirty tile marker based on simple algorithm.
Raphaël Jacquot
sxpert at esitcom.org
Tue Sep 19 08:48:17 BST 2006
Nick Hill wrote:
> I see a need for two additional dimensions to the underlying data
> representation.
>
> 1) A system to quickly determine if an area needs to be re-rendered. For
> example, if an update has been made to an area.
>
> 2) A system to speed the collection of data from the database.
>
> Both of these goals can be achieved by representing the globe as virtual
> tiles.
>
> The tile which any object sits on can easily be determined as follows,
> using only a few cheap CPU cycles, assuming lat and lon are 32 bit integers:
>
> tile=(lat & 4294901760)+(lon>>16)
>
> where & is bitwise and, and >> is right shift.
>
> This will divide the world up into 6553.6uD tiles. On the equator, these
> would be 655x655meters. If the whole planet were to be represented, this
> would be 3.0174851x10E9 tiles of varying size. In reality, we'd probably
> ever get to a few tens of million tiles given that much of the earth is
> sea, arctic tundra and desert.
>
> How will this help mark areas as updated?
>
how about using this first ?
http://dev.mysql.com/doc/refman/5.1/en/creating-spatial-indexes.html
More information about the dev
mailing list