[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 10:51:16 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):

 Curiouser and curiouser, you can get wrong answers one at a time, on both
 sides of the line...
 {{{
 SELECT
   ST_AsText(g) AS geog,
   ST_Intersects(ST_GeogFromText('POLYGON ((  -5 -10,  -5 10,  95.0 10,
 95.0 -10 , -5 -10))'), v.g)
 FROM
   (VALUES
     ( ST_GeogFromText( 'POINT (-4 0)'))
     ) v(g);

     geog     | st_intersects
 -------------+---------------
  POINT(-4 0) | f
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5703#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