[postgis-tickets] [PostGIS] #4832: St_intersects on geography crossing equator

PostGIS trac at osgeo.org
Tue Jan 12 13:15:08 PST 2021


#4832: St_intersects on geography crossing equator
---------------------------------------+---------------------------
 Reporter:  mschott                    |      Owner:  pramsey
     Type:  defect                     |     Status:  new
 Priority:  medium                     |  Milestone:  PostGIS 3.1.1
Component:  postgis                    |    Version:  3.0.x
 Keywords:  st_intersects, hemisphere  |
---------------------------------------+---------------------------
 Dear community,

 checking St_intersects on a geography Polygon crossing the equator returns
 a false negative. Issues with geographies crossing the equator are
 mentioned in the FAQs:
 https://postgis.net/docs/manual-3.0/PostGIS_FAQ.html#idm1295 but only in
 reference to a different software. The linked specialised page on
 geography then fails to mention the topic, so I guess this is a request
 for a documentation update. I nevertheless include the code to reproduce
 the issue here:


 {{{#!sql
 with sa as (
     select
         'SRID=4326;POLYGON ((-53.37909456943908 -33.74067597231424,
 -73.29279537699995 -53.165704033999916, -77.73721269399991
 8.13031647300005, -117.12512148894415 32.53166949000396,
 -35.403797980999904 -5.226495049999925, -53.37909456943908
 -33.74067597231424))'::geometry as geom,
         'SRID=4326;POINT (-67.70339406180045
 -4.483407006023738)'::geometry as point)
 select
     geom,
     point,
     st_intersection(geom,
         point) as intersectionGeom,
     st_intersection(geom::geography,
         point::geography) as intersectionGeog,
     st_intersects(point,
         geom) as geomgeom,
     st_intersects(point,
         geom::geography) as geomgeog,
     st_intersects(point::geography,
         geom) as geoggeom,
     st_intersects(point::geography,
         geom::geography) as geoggeog
 from
     sa;
 }}}

 I would expect TRUE for all four intersects-tests but three return FALSE.
 What puzzeled me was the fact that st_intersection works just fine.

 Tanks

 Mo

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4832>
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