« Return to Thread: improving within()

improving within()

by Marco Lechner - FOSSGIS e.V. :: Rate this Message:

Reply to Author | View in Thread

hi list,

we are using within(geometry, geometry) to test if some (~1200) points
are within a polygon. the polygon is defined as buffer(linegeometry,
dist). the problem is, that the line is always the same and therefore
the result of buffer(linegeometry, dist)  is always the same. while
iterating through the points the within() calculates the
buffer(linegeometry) each time again. the function takes 40s. instead of
0.04s if i calculate the buffergeometry first and use it as "fixed
geometry" at within() - is this somehow improvable (within() recognizing
such a behaviour?, ...)?

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

 « Return to Thread: improving within()