[geos-devel] LINEARRING WKB serialisation problem?

hrz at geodata.soton.ac.uk hrz at geodata.soton.ac.uk
Wed Nov 22 06:29:01 EST 2006


Hello Folks,

When, using CAPI 3.0.0rc2-CAPI-1.3.0, code along the following line
prints out a LINESTRING instead of the LINEARRING I was expecting.

 geom = GEOSGeomFromWKT("LINEARRING(1 1, 2 2, 3 3, 1 1)");
 wkb = GEOSGeomToWKB_buf(geom, &size);
 geom2 = GEOSGeomFromWKB_buf(wkb, size);
 printf("%s\n", GEOSGeomToWKT(geom2)); 

The same problem exists when using the HEX equivalents.
GEOSGeomToWKT, however, properly represents a LINEARRING. Or is this
some sort of limitation/bug in the WKB fromat?

Thanks,

Homme.





More information about the geos-devel mailing list