<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Simon,</p>
<p>Thank you. Strk already helped me. I was actually looking for ST_ForceCurve(), which is forcing my geometries into a CompoundCurve geometry, because my target table has a constraint on this geometry type. I don't care too much if the actual geometry is  a LineString or a CircularArc (for this particular case).</p>
<p>Thank you,</p>
<p>Andreas</p>
<p>On 2016-10-07 12:58, Simon Greener wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><span style="white-space: nowrap;">Andreas,</span><br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><span style="white-space: nowrap;">I am trying to convert a LineString to a CompoundCurve.</span><br /><br /><span style="white-space: nowrap;">I was trying ST_LineToCurve(), but it seems to return again a LineString ;-(</span><br /><br /><span style="white-space: nowrap;">Casting with ::geometry(CompoundCurve,21781) doesn't work either.</span><br /><br /><span style="white-space: nowrap;">Is this impossible to do or did I miss something?</span><br /><br /><span style="white-space: nowrap;">----------------</span><br /><br /><span style="white-space: nowrap;">The reason I want to do it, is that I have some road data which is in</span><br /><span style="white-space: nowrap;">CompoundCurve type. I want to use ST_LineStubstring() on this geometry,</span><br /><span style="white-space: nowrap;">so I use ST_CurveToLine(). I want to convert the result back into a</span><br /><span style="white-space: nowrap;">CompoundCurve, for being able to store it in a table which has a</span><br /><span style="white-space: nowrap;">constraint on CompoundCurve type.</span><br /><br /><span style="white-space: nowrap;">Thank you, if you have an idea!</span></blockquote>
<br /><span style="white-space: nowrap;">I've done some work on this in the past for customers. The function looks for triplets that form a circular arc and turn them into a circular linestring.</span><br /><br /><span style="white-space: nowrap;">I can see if I can dig it up if someone else has not already helped you out.</span><br /><br /><span style="white-space: nowrap;">Oh, like most things spatial, can you give us an example before/after (WKT)?</span><br /><br /> regards<br /> Simon<br /> -- <br /><span style="white-space: nowrap;">Holder of "2011 Oracle Spatial Excellence Award for Education and Research."</span><br /><span style="white-space: nowrap;">SpatialDB Advice and Design, Solutions Architecture and Programming,</span><br /><span style="white-space: nowrap;">Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional</span><br /><span style="white-space: nowrap;">Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.</span><br /><span style="white-space: nowrap;">39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.</span><br /><span style="white-space: nowrap;">Website: <a href="http://www.spatialdbadvisor.com">www.spatialdbadvisor.com</a></span><br /><span style="white-space: nowrap;">  Email: <a href="mailto:simon@spatialdbadvisor.com">simon@spatialdbadvisor.com</a></span><br /><span style="white-space: nowrap;">  Voice: +61 362 396397</span><br /><span style="white-space: nowrap;">Mobile: +61 418 396391</span><br /><span style="white-space: nowrap;">Skype: sggreener</span><br /><span style="white-space: nowrap;">Longitude: 147.20515 (147° 12' 18" E)</span><br /><span style="white-space: nowrap;">Latitude: -43.01530 (43° 00' 55" S)</span><br /><span style="white-space: nowrap;">GeoHash: r22em9r98wg</span><br /><span style="white-space: nowrap;">NAC:W80CK 7SWP3</span><br /> _______________________________________________<br /><span style="white-space: nowrap;">postgis-users mailing list</span><br /><span style="white-space: nowrap;"><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a></span><br /><span style="white-space: nowrap;"><a href="http://lists.osgeo.org/mailman/listinfo/postgis-users">http://lists.osgeo.org/mailman/listinfo/postgis-users</a></span></div>
</blockquote>
<p> </p>
<div> </div>
</body></html>