[geos-devel] C API coordinate sequence dimensions

Sanak geosanak at gmail.com
Mon Jan 12 07:40:31 EST 2009


Hi list,

I don't know that this is a known bug, but
CoordinateArraySequence.getDimension() method always return 3.

[trunk/source/headers/geos/geom/CoordinateArraySequence.h - line 88]
size_t getDimension() const { return 3; }


JTS(JTS Topology Suite) seems to be also the same.

[jts/src/com/vividsolutions/jts/geom/DefaultCoordinateSequence.java - line
95]
public int getDimension() { return 3; }

I don't know that this is a specification or not...

Regards,

Sanak.

2009/1/12 Sean Gillies <sgillies at frii.com>

> I'm finding that GEOSCoordSeq_getDimensions returns 3 no matter what
>
>  # Accessing libgeos_c via Python ctypes
>  >>> s = lgeos.GEOSCoordSeq_create(2, 2)
>  >>> ndim = c_int()
>  >>> lgeos.GEOSCoordSeq_getDimensions(s, byref(ndim))
>  1
>  >>> ndim
>  c_long(3)
>
> Is this a known bug? Looks like we're only testing creation of 3D
> coordinate sequences in
>
>
> http://trac.osgeo.org/geos/browser/trunk/tests/unit/capi/GEOSCoordSeqTest.cpp
>
> --
> Sean Gillies
> http://sgillies.net
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20090112/f0ec9050/attachment.html


More information about the geos-devel mailing list