P, So does that mean you can create a more efficent st_dwithin that instead of doing this
SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND ST_Distance($1, $2) < $3 Does this SELECT $1 && ST_Expand($2,$3) AND $2 && ST_Expand($1,$3) AND _ST_DWithin($1, $2, $3) And the new _ST_Dwithin function would do exactly what distance does except it would return a boolean and kick out a true as soon as it finds a point set where the distance is < $3; no need to wait to reach 0. R -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Ramsey Sent: Thursday, October 25, 2007 10:50 AM To: PostGIS Users Discussion Subject: Re: [postgis-users] noding problem Yes, that is all the magic there is to the "distance is faster" assertion. Obviously it's only faster for cases where there are lots of fully contained candidates that return immediately on the first point test. P On 25-Oct-07, at 4:24 AM, Obe, Regina wrote: > Am I safe in saying that distance treats the case of distance() == > 0 as > a special case - e.g. you can't get lower than 0 for distance so there > is no point in checking any further? _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users ----------------------------------------- The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
