[postgis-users] Inconsistent results on ST_Intersects and ST_Distance

Alexander Gataric gataric at usa.net
Wed Feb 26 08:48:36 PST 2020


You could also try st_disjoint or st_touches.

⁣Get BlueMail for Android ​

On Feb 26, 2020, 10:07 AM, at 10:07 AM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
>
>
>> On Feb 26, 2020, at 2:02 AM, Palmetzhofer Dietmar
><Dietmar.Palmetzhofer at vorarlberg.at> wrote:
>> 
>> I have a simple LINE-Geometry and a POINT, that I want to query, if
>it intersects the line.
>> The result ist, that ST_Intersects gives „FALSE“, and ST_Distance
>gives „0“. So, this is contradictory. An analysis with JTS shows, that
>there is a distance of 6.611191059663252E-13.
>> Should ST_Distance not also return this result?
>> 
>
>They are different code lines, and have different tolerances. At some
>point “very small” becomes “zero”, and unfortunately these two lines
>have different places where that happens. If we patched up this case
>you’d just find a new one at E-20 :) the boundary between real math and
>discrete math exists and is manifest in the code.
>
>P
>_______________________________________________
>postgis-users mailing list
>postgis-users at lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200226/2cdb7dbe/attachment.html>


More information about the postgis-users mailing list