spatial index - B-Tree over z-order curves vs R-Tree over GIST

Hi,

PostGIS uses R-Tree index over GIST.
I’m trying to understand if it is possible to use couchDB for storing the osm geo data.
couchdb is a schema less db for storing documents. Each document store data as 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. 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

I see you’ve posted this on the Development mailinglist as well. A wise choice I guess :slight_smile: This level of technicality is rarely discussed here…

And that thread is a good read:
http://www.nabble.com/spatial-index—B-Tree-over-z-order-curves-vs-R-Tree-over-GIST-td22961634.html