[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 00:12:08 BST 2009


Hi,

I posted this question in the forum but I think that the list is more
active.

PostGIS uses R-Tree index over GIST.
I'm trying to understand if it is possible to use couchDB for storing and
indexing the osm data.
couchdb is a schema less db for storing documents. Each document store data
encoded as JSON.
It uses B-Tree index so the only way I know to enable spatial index is to
use space-filling-curves (z-order, morton codes)
to translate a lat,lng to a number and then index all the numbers using a
B-Tree.

My question is why PostGIS choose to use R-Tree over GIST. Using z-order
with B-Tree seem simpler and supported out of the box
by most databases. Is there a significant performance difference or other
issues against using z-order?

http://couchdb.apache.org/
http://en.wikipedia.org/wiki/Z-order_(curve)
http://postgis.refractions.net/documentation/manual-1.3/ch03.html#id2741805

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090409/7d962c2d/attachment.html>


More information about the dev mailing list