[postgis-users] Find polygon that overlaps

Maxime van Noppen maxime at altribe.org
Mon Aug 17 02:04:51 PDT 2009

On 08/15/09 15:34, tommy408 wrote:
> I'm about to insert a polygon into a large table.  Whats the fastest way to
> find if this polygon will overlap another polygon inside the table?  


What do you mean exactly by 'overlap' ? Has it to totally cover another
polygon ? Or just simply intersect with it ?

If it is the latter I suggest using ST_Intersects which returns true if
two polygons intersect. It could also be interesting to create a GIST
index on your table to speed up the query (ST_Intersects uses any index


More information about the postgis-users mailing list