[postgis-tickets] [PostGIS] #4326: Circular strings distances are wrong

PostGIS trac at osgeo.org
Fri Feb 15 16:25:53 PST 2019


#4326: Circular strings distances are wrong
---------------------+---------------------------
 Reporter:  komzpa   |      Owner:  strk
     Type:  defect   |     Status:  assigned
 Priority:  medium   |  Milestone:  PostGIS 2.5.2
Component:  postgis  |    Version:  2.4.x
 Keywords:           |
---------------------+---------------------------
 {{{
 03:23:10 [kom] > select
 ST_Distance('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(1 6, 6 1, 9 7),(9
 7, 3 13, 1 6)),COMPOUNDCURVE((3 6, 5 4, 7 4, 7 6),CIRCULARSTRING(7 6,5 8,3
 6)))', 'CURVEPOLYGON(CIRCULARSTRING(-1 4, 0 5, 1 4, 0 3, -1 4))');
 ┌────────────────────┐
 │    st_distance     │
 ├────────────────────┤
 │ 0.0475665993629137 │
 └────────────────────┘
 (1 row)

 Time: 35,112 ms

 03:23:53 [kom] > select ST_Distance('CURVEPOLYGON(CIRCULARSTRING(-1 4, 0
 5, 1 4, 0 3, -1 4))','CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(1 6, 6 1,
 9 7),(9 7, 3 13, 1 6)),COMPOUNDCURVE((3 6, 5 4, 7 4, 7 6),CIRCULARSTRING(7
 6,5 8,3 6)))');┌─────────────┐
 │ st_distance │
 ├─────────────┤
 │           0 │
 └─────────────┘
 (1 row)

 Time: 1,292 ms

 }}}


 To find more: swap lw1 and lw2 in https://github.com/postgis/postgis/blob
 /svn-trunk/liblwgeom/cunit/cu_measures.c#L65

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