[postgis-tickets] [PostGIS] #2407: st_linetocurve and st_curvetoline behaviour change

PostGIS trac at osgeo.org
Tue Aug 6 09:01:48 PDT 2013


#2407: st_linetocurve and st_curvetoline behaviour change
---------------------+------------------------------------------------------
 Reporter:  mjurce   |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.4
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 Hi,
 from the version 1.5.X to 2.0 there is the difference in function
 behavior, especially in the st_linetocurve.
 I checked the code and whole part that try to build the cirucalr strings
 was removed.

 Input geometry:

 MULTICURVE((723097.524 117088.672,724308.441
 117063.281),CIRCULARSTRING(724308.441 117063.281,724664.096
 117359.505,725443.148 117452.604))

 st_curvtoline old result:

 MULTILINESTRING((723097.524 117088.672,724308.441
 117063.281,724342.841215729 117105.022471112,724379.248151801 117
 145.025724211,724417.57410072 117183.194387958,724457.726731918
 117219.436510698,724499.609314188 117253.664781983,7
 24543.120948721 117285.796742909,724588.15681218
 117315.754984769,724634.608409223 117343.467335533,724682.363833886
  117368.867033721,724731.308039167 117391.892889235,724781.323114189
 117412.489430773,724832.288568255 117430.607039
 462,724884.081621122 117446.202068396,724936.577498789
 117459.236947784,724989.64973409 117469.680275461,725043.1704
 7136 117477.506892534,725097.010774456 117482.697943997,725151.040937372
 117485.240924154,725205.130796712 117485.12
 9706743,725259.150045268 117482.364559695,725312.968545938
 117476.952144492,725366.456645242 117468.905500116,725419
 .485485661 117458.244011639,725443.148 117452.604))


 st_curvetoline new result:

 MULTILINESTRING((723097.524 117088.672,724308.441 117063.281),(724308.441
 117063.281,724342.841215729 117105.022471
 112,724379.248151801 117145.025724211,724417.57410072
 117183.194387958,724457.726731918 117219.436510698,724499.6093
 14188 117253.664781983,724543.120948721 117285.796742909,724588.15681218
 117315.754984769,724634.608409223 117343.46
 7335533,724682.363833886 117368.867033721,724731.308039167
 117391.892889235,724781.323114189 117412.489430773,724832
 .288568255 117430.607039462,724884.081621122
 117446.202068396,724936.577498789 117459.236947784,724989.64973409 1174
 69.68027546,725043.17047136 117477.506892533,725097.010774456
 117482.697943997,725151.040937372 117485.240924154,725
 205.130796712 117485.129706743,725259.150045268
 117482.364559695,725312.968545938 117476.952144492,725366.456645242
 117468.905500116,725419.485485661 117458.244011639,725443.148 117452.604))

 Not big change.


 st_linetocurve old result:

 MULTICURVE((723097.524 117088.672,724308.441
 117063.281),CIRCULARSTRING(724308.441 117063.281,724832.288568255 1174
 30.607039462,725419.485485661 117458.244011639),(725419.485485661
 117458.244011639,725443.148 117452.604))

 The orginal shape is preserved with this small extra line segment.

 st_linetocurve new behavior result:

 MULTICURVE(COMPOUNDCURVE((723097.524 117088.672,724308.441
 117063.281),CIRCULARSTRING(724308.441 117063.281,724457.
 726731918 117219.436510698,724682.363833886
 117368.867033721),CIRCULARSTRING(724682.363833886 117368.867033721,72498
 9.64973409 117469.680275461,725366.456645242
 117468.905500116),(725366.456645242 117468.905500116,725419.485485661 1
 17458.244011639,725443.148 117452.604)))

 Here there are 2 extra arcs.


 The old behavior preserved the original shape of the geometry through
 conversion,the new one
 introduces extra arcs.

 Why of this change, is possible to get also the old version of functions
 in newer version of postgis?

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