[geos-devel] LINEARRING WKB serialisation problem?
strk at refractions.net
strk at refractions.net
Wed Nov 22 07:10:34 EST 2006
On Wed, Nov 22, 2006 at 11:29:01AM +0000, hrz at geodata.soton.ac.uk wrote:
> 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?
It's a limitation in the WKB format. It does NOT have
the concept of a linearring. Actually, no notion of
it is found in OGC standards too, so you may tell it's just
a JTS/GEOS discrepancy.
--strk;
More information about the geos-devel
mailing list