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

PostGIS trac at osgeo.org
Thu Aug 8 07:05:07 PDT 2013


#2407: st_linetocurve behaviour change
---------------------+------------------------------------------------------
 Reporter:  mjurce   |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.4
Component:  postgis  |     Version:  2.0.x        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by strk):

 I couldn't find any version of PostGIS that was able to given an answer to
 this query:
 {{{
 select st_linetocurve(st_curvetoline('MULTICURVE((723097.524
 117088.672,724308.441 117063.281),CIRCULARSTRING(724308.441
 117063.281,724664.096 117359.505,725443.148 117452.604))'));
 }}}

 Tried from 1.5.3 up to 2.2.0, all versions raise an exception.

 But passing the result of ST_CurveToLine to an ST_LineMerge make them able
 to given an answer, and indeed 1.5 answer is half the length of 2.0
 answer. Was LineMerge the missing bit ?

 ST_LineMerge(ST_CurveToLine(g)) returns a single linestring of 26 points
 with a total length of 2479 units in all versions from 1.5 to 2.2 now, so
 maybe the problem is _only_ in the ST_LineToCurve function. The input to
 ST_LineToCurve:

 {{{
 LINESTRING(723097.524 117088.672,724308.441 117063.281,724342.841215728
 117105.022471111,724379.2481518 117145.02572421,724417.574100719
 117183.194387956,724457.726731915 117219.436510696,724499.609314185
 117253.66478198,724543.120948718 117285.796742906,724588.156812175
 117315.754984765,724634.608409218 117343.467335528,724682.36383388
 117368.867033715,724731.30803916 117391.892889229,724781.323114181
 117412.489430767,724832.288568246 117430.607039456,724884.081621113
 117446.20206839,724936.57749878 117459.236947778,724989.649734079
 117469.680275453,725043.170471349 117477.506892526,725097.010774444
 117482.69794399,725151.040937359 117485.240924147,725205.130796698
 117485.129706735,725259.150045253 117482.364559687,725312.968545923
 117476.952144484,725366.456645225 117468.905500109,725419.485485643
 117458.244011632,725443.148 117452.604)
 }}}

 Turning the above to a curve in 1.5 returns a 7 points curve, in 2.0 and
 2.2 returns a 28 points curve (!)

 I updated the ticket summary to only mention ST_LineToCurve

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