[postgis-tickets] [PostGIS] #4558: ST_Intersects returns FALSE while ST_Intersection returns a geometry.
PostGIS
trac at osgeo.org
Fri Oct 25 07:56:59 PDT 2019
#4558: ST_Intersects returns FALSE while ST_Intersection returns a geometry.
----------------------+---------------------------
Reporter: olehz | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.5.4
Component: postgis | Version: 2.5.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by mdavis):
This is a classic case caused by numeric precision issues. The JTS FAQ
has an [explanation](https://locationtech.github.io/jts/jts-faq.html#D8)
of why this happens. JTS produces the same result.
This case is particularly interesting/egregious, because it can be reduced
to the following:
```
A: LINESTRING (-57 6.939016666666666, -57.001016666666665
7.935202777777778)
B: LINESTRING (-57.2696825964778 7.15879416404005, -57 6.93901666666667)
```
By inspection these two lines do intersect. So the line segment
intersection computation is computing an incorrect answer. Much work has
been done to try and make this computation robust, but clearly there is
more work to do.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4558#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list