[OSM-dev] Lite OSM backend - quadtrees
David Sheldon
dave at earth.li
Thu Sep 7 22:58:27 BST 2006
On Thu, Sep 07, 2006 at 08:51:26PM +0100, Nigel Magnay wrote:
> like), you halve the area in each addressable tile. For around 13
> characters, you get (IIRC) 100m of resolution if you started with the
> entire globe (may be wrong, memory is hazy).
Would it help to use 2 bits for each of the characters in your example?
This way we could get 16 levels in a 32bit integer. The lookups then
become ranges on integers (I would have said at least as fast as the
LIKE matching), or bitmasking when we're not using SQL.
It might be a little harder for people to understand though.
David
--
"Throwing it all away refers to the activity of coming along and
fiddling with your program, making it less efficient and incorrect."
-- Carroll Morgan
More information about the dev
mailing list