lundi 2 février 2015

How to port simple spatial index using SQLite R-Trees to Postgres?

I have implemented a simple spatial indexing schema based on bounding boxes by following the SQLite R*Tree tutorial, which has given me the following schema:



CREATE VIRTUAL TABLE events_region USING rtree(
id, -- primary key
xmin, xmax, -- minimum and maximum X coordinate
ymin, ymax, -- minimum and maximum Y coordinate
);


I want to now port this schema to Postgres (but not using PostGIS in order to cut down on dependencies). I know that this should be possible using a GIST index (as R-trees have been phased out, with GIST now filling their role), but I'm struggling to work out how to go about this.


Aucun commentaire:

Enregistrer un commentaire