Re: [postgis-users] Finding Geometries that overlap with the given ones

2015-03-03 Thread Paul Ramsey
Oh yeah, actually that's an important enhancement if a lot of the lines are going to be 100% inside their target polygons, to avoid running the full Intersection() test... ST_Within() and ST_Contains() are the same, (code actually just gates one into the other, with reversed arguments) and as

Re: [postgis-users] Finding Geometries that overlap with the given ones

2015-03-03 Thread Igor Stassiy
Thanks Paul. What if I want to say ST_Contains(A, B)? And will it matter if I say ST_Within(B, A) instead? I have a feeling it will, since most likely the query planner will decide to process A row by row and find a suitable B each time. In this case, we need a GiST index on B, so that we could