[OSM-dev] spatial index - B-Tree over z-order curves vs R-Tree over GIST

pablo platt pablo.platt at gmail.com
Thu Apr 9 15:17:10 BST 2009


On Thu, Apr 9, 2009 at 1:30 PM, Frederik Ramm <frederik at remote.org> wrote:

> Hi,
>
> pablo platt wrote:
>
>> Is the tiles resolution predetermined
>>
>
> Yes, it is 32 bits.
>
> We take lat and lon and scale them to a 16 bit value each (this means we
> get 0.0055° precision in the East-West direction and 0.0027° precision in
> the Norh-South direction). Then we use first bit of the 16-bit longitude
> value, then the first bit of the 16-bit longitude value, then the second of
> each, and so on, to build a 32-bit tile value.
>
> Bye
> Frederik


How do I query this db?
For example, if I want to find all records in a distance <= 1.5KM from a
(lat, lng) point.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090409/a4babe3d/attachment.html>


More information about the dev mailing list