[postgis-users] New Curve Types in 1.2
Ken Southerland
southerland at samsix.com
Tue Dec 12 15:46:30 PST 2006
Thanks Mark,
But now I'm having problems creating a geometry of this new type. I'm on SuSE
Linux 10.0, 64-bit version. I downloaded the postgis 1.2 source and ran ...
./configure
make
make install
...checked that I have the new version of the liblwgeom.so.1.2 and that
liblwgeom.so points to it. I also remove the liblwgeom.so.1.1 that got left
behind and then restarted postgres. Then ran ...
psql -d <dbname> -f lwpostgis_upgrade.sql
... and it ran fine.
But when I issue the following command ...
update <table> set <geom_col> = GeomFromText( 'CIRCULARSTRING(29249.265625
27575.26953125,29473.98828125 27559.947265625,29299.525390625
27389.2734375)' ) where <condition>;
... I get ...
ERROR: Invalid OGC WKT (does not start with P,L,M or G)
CONTEXT: SQL function "geomfromtext" statement 1
... What am I missing? Or is this a result of the WKT not being fully
functioning yet as the documentation mentions.? Thanks for your help.
Ken
On Tuesday 12 December 2006 2:29 pm, Mark Leslie wrote:
> Ken,
> 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.
> Mark
>
> 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
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
--
------s----a----m----s----i----x------
--
Ken Southerland
Senior Consultant
Sam Six, Inc.
503-236-4288
http://www.samsix.com
More information about the postgis-users
mailing list