I'm looking for the fastest way to detect whether a given linestring
overlaps another linestring. Here's my current approach.

Given two tables: r1 and s1, both containing a geo_data column of
linestring, first narrow the data (taking advantage of gist index) with
r1.geo_data && s1.geo_data, then use ST_Contains to see if s1 is
overlapping r1, i.e. r1.geo_data && s1.geo_data
and ST_Contains(ST_Buffer(r1.geo_data,ST_Length(r1.geo_data)*.002),s1.geo_data)

This approach works, but it's extremely CPU-intensive and slow. Is there a
better approach?

Thanks,

--
Adam McManus
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to