[PostGIS] #5740: ST_DistanceSpheroid doesn't return 0 when one geometry contains the other

PostGIS trac at osgeo.org
Wed Jun 12 03:06:59 PDT 2024


#5740: ST_DistanceSpheroid doesn't return 0 when one geometry contains the other
-------------------------+---------------------------
  Reporter:  cdestigter  |      Owner:  pramsey
      Type:  defect      |     Status:  new
  Priority:  medium      |  Milestone:  PostGIS 3.4.3
 Component:  postgis     |    Version:  3.4.x
Resolution:              |   Keywords:
-------------------------+---------------------------
Comment (by cdestigter):

 I've had a browse around the code, and it seems like the bug is
 [https://github.com/koordinates/postgis/blob/c055f1acdd1af5a03408c1b67743abc3b4bdf7a8/liblwgeom/lwgeodetic.c#L1983-L1988
 here] - the code checks for edge intersections and returns 0 if there are
 any but it doesn't check for containment.

 I'm not sure how ST_DistanceSphere avoids the issue since it looks like it
 probably goes down a similar codepath
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5740#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