[postgis-tickets] [PostGIS] #4336: ST_LineToCurve generates wrong Arcs for Epsilon 1E-1 (+ potential fix)

PostGIS trac at osgeo.org
Wed Apr 24 14:31:27 PDT 2019


#4336: ST_LineToCurve generates wrong Arcs for Epsilon  1E-1 (+ potential fix)
-------------------------+---------------------------
  Reporter:  tvijlbrief  |      Owner:  pramsey
      Type:  defect      |     Status:  new
  Priority:  medium      |  Milestone:  PostGIS 2.5.3
 Component:  postgis     |    Version:  2.4.x
Resolution:              |   Keywords:
-------------------------+---------------------------

Comment (by pramsey):

 OK, now I'm quite confused. The geometries you are giving are, in WKT,
 this

 `CURVEPOLYGON((147581.256 468550.143,147578.59 468548.055,147575.584
 468540.815,147574.293 468538.813,147573.024 468537.369,147546.127
 468516.624,147521.175 468497.798,147609.007 468486.657,147609.55
 468486.638,147610.088 468486.717,147610.602 468486.892,147611.077
 468487.156,147611.496 468487.502,147611.845 468487.918,147612.114
 468488.391,147612.293 468488.904,147612.377 468489.44,147612.363
 468489.984,147612.25 468490.515,147612.044 468491.018,147607.368
 468500,147581.256 468550.143))`

 and

 ` CURVEPOLYGON((147796.765 468463.463,147802.152 468462.798,147802.584
 468463.225,147802.826 468464.585,147802.774 468465.673,147794.184
 468483.75,147799.986 468486.776,147799.629 468487.685,147790.194
 468505.862,147789.543 468507.429,147789.316 468508.151,147789.29
 468508.926,147790.472 468513.134,147794.511 468526.193,147796.119
 468529.236,147796.917 468530.122,147797.817 468530.799,147805.41
 468535.204,147806.129 468535.703,147806.287 468535.998,147806.305
 468536.312,147806.188 468536.727,147805.874 468537.355,147805.53
 468538.003,147804.411 468540.138,147793.163 468534.44,147784.008
 468508.351,147793.934 468488.709,147788.196 468485.581,147797.082
 468466.948,147796.765 468463.463))`

 But these geometries don't actually include curves... the WKT for
 CurvePolygon requires that the curved portions be appropriately tagged as
 CIRCULARSTRING. Untagged portions are considered to be ordinary
 LINEARRINGs. So now I'm really not sure what's the problem precisely. The
 picture isn't what I want.

 I'd like to see:

 * An input `LineString`.
 * The simple, three-point `CircularString` you'd expect to get from
 `ST_LineToCurve `.
 * The `CircularString` you *do* get from `ST_LineToCurve`

 Basically, I need to be able to replicate your condition, on my own
 machine. That way I can (a) verify that your fix works for me and (b)
 verify if I have a different fix that also works.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4336#comment:8>
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