[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 11:32:23 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):

 This is an effect of ring orientation?
 {{{
 -- CCW (bounds small area, pt is outside)
 SELECT _ST_DistanceUnCached(
   'POLYGON ((  -5 10,  -5 -10,  95.0 -10, 95.0 10 , -5 10))'::geography,
   'POINT (-6 0)'::geography
   );

 -- CW (bounds everything except small area, pt is inside)
 SELECT _ST_DistanceUnCached(
   'POLYGON ((  -5 -10,  -5 10,  95.0 10, 95.0 -10 , -5 -10))'::geography,
   'POINT (-6 0)'::geography
   );
 }}}
 But I cannot remember handling ring orientation.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5703#comment:4>
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