[PostGIS] #5989: ST_Distance error on curvepolgyon

PostGIS trac at osgeo.org
Thu Sep 18 13:22:45 PDT 2025


#5989: ST_Distance error on curvepolgyon
----------------------+---------------------------
  Reporter:  pramsey  |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 3.5.4
 Component:  postgis  |    Version:  3.2.x
Resolution:           |   Keywords:
----------------------+---------------------------
Comment (by pramsey):

 Smaller reproduction yet, the point is being incorrectly flagged as inside
 the polygon (distance 0.0) when actually it is outside (distance 0.199)
 {{{
 SELECT ST_Distance(
   ST_GeomFromText('POINT(25498577.925067347 6679764.376426865)'),
   ST_GeomFromText('CURVEPOLYGON(COMPOUNDCURVE(
     (25498687.296406467 6679794.584487298,25498652.7219
 6679752.4351,25498649.618 6679749.1379,25498615.3055
 6679712.6856,25498584.874 6679680.3574,25498571.0593
 6679686.228,25498572.5718 6679717.5059,25498572.5935
 6679717.9476,25498572.6156 6679718.3893),CIRCULARSTRING(25498572.6156
 6679718.3893,25498575.9546 6679753.1238,25498582.4167
 6679787.4148,25498582.6547 6679788.418,25498582.8953
 6679789.4206),(25498582.8953 6679789.4206,25498583.4717
 6679791.8086,25498577.35416496 6679793.28540422,25498558 6679652,25498706
 6679794,25498687.296406467 6679794.584487298)))')
   ) AS dist;
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5989#comment:6>
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