[postgis-users] Efficient SQL for point in field of shapes?

John Poole jlpoole56 at gmail.com
Fri Sep 3 09:55:43 PDT 2010


I have a table of assessor parcels (polygons) and I want to take a
given point (actually will be taking samplings from a geocache
tracker, so I'll be doing hundreds, possibly thousands of such
queries) and determine which, if any, of the shapes contain the point.
 The goal is to determine which parcel a tracked person is within and
at what times.


I'm new to spatial database, and suspect performing a relate or
ST_contains against the 40,000 shapes would be horribly inefficient,
especially if I have thousands of points.  Should I be reading up on
indexes, or is there an elegant solution to this problem.

I tried searching the archive of this list for "point in field of
shapes" but results were too generic.

John L. Poole



More information about the postgis-users mailing list