[postgis-users] New Curve Types in 1.2

Mark Leslie mark at refractions.net
Tue Dec 12 14:29:02 PST 2006

You are correct that the compound curve example is missing a parenthese.
 COMPOUNDCURVE((0 0, 1 1, 1 0),(1 0, 0 1)) is correct, but wasn't a very
good example in the first place, since it's equivalent to LINESTRING(0
0, 1 1, 1 0, 0 1).
A better example would be COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1
0, 0 1)).  When a sequence of points is left unqualified in the compound
curve definition (or MULTICURVE and CURVEPOLYGON for that matter) it is
assumed to be a LINESTRING.  In fact, LINESTRING can never be explicitly
stated in the SQL-MM defined WKT.
Similar rules apply to POLYGONS in MULTISURFACEs.

Ken Southerland wrote:
> This is very exciting news for us as we are just about to implement 
> curves/arcs in our application.  I was just about to write code that would 
> store meta data to translate line strings into arcs/curves.  But now maybe I 
> don't have to.
> Is there any other documentation specific to the new curve types?  I see brief 
> mention of them in the html documentation accompanying the source code.  
> Specifically I see the following line ...
> COMPOUNDCURVE((0 0, 1 1, 1 0),(1 0, 0 1)
> ...as an example of a mixed curve/straight line sequence.  First off, I'm 
> assuming it is missing a closed parantheses at the end of the string.  In 
> other words, I'm assuming it should read ...
> COMPOUNDCURVE((0 0, 1 1, 1 0),(1 0, 0 1))
> ... but then a further question I have is how this is read.  I'm assuming that 
> this means there is an arc defined by the 3 points in the first set of 
> parantheses and then a short straight line sequence followed by the two 
> points defined in the second set.  But how is this determined?  What if I had 
> a 3-point LineString definition in the second part?  How does the 
> CompoundCurve know that I meant a straight line sequence and not a 
> CicularString sequence?
> Also, are there java classes yet written to handle these, like the LineString 
> class found in the java/jdbc/src/org/postgis/ subdirectory?
> Also, is it true that only circular arcs are currently implemented?  What is 
> the outlook for more complex curves like a Bezier curve?
> Cheers!  I'm very thrilled with this news!
> Ken

More information about the postgis-users mailing list