[postgis-users] Converting a LineString to a CompoundCurve

Neumann, Andreas a.neumann at carto.net
Fri Oct 7 04:37:35 PDT 2016


Hi Simon, 

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). 

Thank you, 

Andreas 

On 2016-10-07 12:58, Simon Greener wrote:

> Andreas,
> 
>> I am trying to convert a LineString to a CompoundCurve.
>> 
>> I was trying ST_LineToCurve(), but it seems to return again a LineString ;-(
>> 
>> Casting with ::geometry(CompoundCurve,21781) doesn't work either.
>> 
>> Is this impossible to do or did I miss something?
>> 
>> ----------------
>> 
>> The reason I want to do it, is that I have some road data which is in
>> CompoundCurve type. I want to use ST_LineStubstring() on this geometry,
>> so I use ST_CurveToLine(). I want to convert the result back into a
>> CompoundCurve, for being able to store it in a table which has a
>> constraint on CompoundCurve type.
>> 
>> Thank you, if you have an idea!
> 
> 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.
> 
> I can see if I can dig it up if someone else has not already helped you out.
> 
> Oh, like most things spatial, can you give us an example before/after (WKT)?
> 
> regards
> Simon
> -- 
> Holder of "2011 Oracle Spatial Excellence Award for Education and Research."
> SpatialDB Advice and Design, Solutions Architecture and Programming,
> Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
> Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
> 39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
> Website: www.spatialdbadvisor.com [1]
> Email: simon at spatialdbadvisor.com
> Voice: +61 362 396397
> Mobile: +61 418 396391
> Skype: sggreener
> Longitude: 147.20515 (147° 12' 18" E)
> Latitude: -43.01530 (43° 00' 55" S)
> GeoHash: r22em9r98wg
> NAC:W80CK 7SWP3
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users

  

Links:
------
[1] http://www.spatialdbadvisor.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20161007/920b9154/attachment.html>


More information about the postgis-users mailing list