Alex Trofast wrote:
Hi all,

After reading the source and if I did it right, it seems like that GEOSGeom_getDimensions_r would always return a 3, judging by getDimensions in this file: source/headers/geos/geom/CoordinateArraySequence.h If this is the case am I misunderstanding what GEOSGeom_getDimensions_r is actually supposed to do: return 0 for point, 1 for curve, 2 for surface?
Any help is greatly appreciated,

Alex,

I do not believe that a CoordinateArraySequence is a Geometry based on my
cursory review.  Instead the particular instance classes of Geometry, like
LineString, own an instance of a CoordinateArraySequence, but actually provide
their own implementation of Geometry::getDimension(). In the case of LineString
I see this returns Dimension::L which I assume is 2.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to