[PostGIS] #5989: ST_Distance error on curvepolgyon
PostGIS
trac at osgeo.org
Thu Sep 18 11:16:01 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:
----------------------+---------------------------
Description changed by pramsey:
Old description:
> The objects are close together and in a concave, contained arrangement,
> but the distance is definitely non-zero throughout, and the function is
> returning zero.
> {{{
> SELECT ST_Distance(
> 'POLYGON((25498578 6679764,25498577 6679761,25498577 6679757,25498576
> 6679753,25498576 6679750,25498575 6679746,25498575 6679742,25498574
> 6679739,25498574 6679735,25498574 6679731,25498573 6679728,25498615
> 6679713,25498649 6679749,25498630 6679763,25498627 6679765,25498617
> 6679755,25498616 6679755,25498616 6679755,25498616 6679755,25498578
> 6679764))'::geometry,
> 'MULTISURFACE(CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(25498687
> 6679795,25498671 6679773,25498653 6679752),(25498653 6679752,25498650
> 6679749,25498615 6679713,25498585 6679680),CIRCULARSTRING(25498585
> 6679680,25498576 6679678,25498571 6679686),(25498571 6679686,25498573
> 6679718,25498573 6679718,25498573 6679718),CIRCULARSTRING(25498573
> 6679718,25498576 6679753,25498582 6679787,25498583 6679788,25498583
> 6679789),(25498583 6679789,25498583 6679792,25498577 6679793),(25498577
> 6679793,25498558 6679652,25498706 6679794,25498687 6679795))))'::geometry
> ) AS dist;
> }}}
> Assigning this to an old milestone, as I think this is probably behaviour
> that dates to the original implementation.
New description:
The objects are close together and in a concave, contained arrangement,
but the distance is definitely non-zero throughout, and the function is
returning zero.
{{{
SELECT ST_Distance(
ST_GeomFromText('POLYGON((25498577.925067347
6679764.376426865,25498577.31346041 6679760.722689815,25498576.736966014
6679757.06324837,25498576.19563731 6679753.398439955,25498575.68952422
6679749.72860249,25498575.218673404 6679746.054074359,25498574.783128276
6679742.375194377,25498574.382929 6679738.692301761,25498574.01811248
6679735.005736099,25498573.68871235 6679731.315837314, 25498573.394758984
6679727.622945643, 25498615.249195762 6679712.917382107,25498649.317714863
6679749.110582217,25498629.859234665 6679763.425791496,25498626.597285368
6679765.4664939325,25498616.53215853 6679754.940559511,25498616.475998268
6679754.899373339,25498616.40912013 6679754.879941631,25498616.33963356
6679754.884620618,25498577.925067347 6679764.376426865))'),
ST_GeomFromText('MULTISURFACE(CURVEPOLYGON(COMPOUNDCURVE(
CIRCULARSTRING(25498687.296406467 6679794.584487298,25498670.728066746
6679772.920079741,25498652.7219 6679752.4351),
(25498652.7219 6679752.4351,25498649.618 6679749.1379,25498615.3055
6679712.6856,25498584.874 6679680.3574),
CIRCULARSTRING(25498584.874 6679680.3574,25498575.9211
6679678.4791,25498571.0593 6679686.228),
(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),
(25498577.35416496 6679793.28540422,25498558 6679652,25498706
6679794,25498687.296406467 6679794.584487298))))')
) AS dist;
}}}
Assigning this to an old milestone, as I think this is probably behaviour
that dates to the original implementation.
--
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5989#comment:3>
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