[PostGIS] #5703: ST_Intersects function is returning the wrong results for a simple rectangle that crosses any two quarter longitude lines

PostGIS trac at osgeo.org
Wed Apr 17 12:51:02 PDT 2024


#5703: ST_Intersects function is returning the wrong results for a simple
rectangle that crosses any two quarter longitude lines
------------------------+---------------------------
  Reporter:  hangstrap  |      Owner:  pramsey
      Type:  defect     |     Status:  new
  Priority:  medium     |  Milestone:  PostGIS 3.4.3
 Component:  postgis    |    Version:  3.4.x
Resolution:             |   Keywords:
------------------------+---------------------------
Comment (by pramsey):

 And in general we do not handle ring orientation, but, when multiple
 corner cases drive us to extremes... we fall back on ring orientation.

 https://github.com/postgis/postgis/blob/8c30a25acb166de09a7d647e1e02dc6d71eae9ea/liblwgeom/lwgeodetic.c#L1429-L1441

 So the "answer" is: even though we don't, in general respect ring
 orientation in geography, if you fail to respect it there are corner cases
 where you'll get the wrong answer, like this case.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5703#comment:5>
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