1. The methods GEOSCoordSeq_getSize and GEOSCoordSeq_getDimensions return their results by updating a pointer to a size_t parameter. Thus like this:

GEOSCoordSeq_getSize(const GEOSCoordSeq s, size_t *size);

In contrast, these methods just return the result:

GEOSGeom_getDimensions returns value, not as a parameter
GEOSGeom_getNumcoordinates
GEOSGeom_getNumInteriorRings
GEOSGeom_getNumGeometries

Seems like an unneeded inconsistency.

A follow up to this. The methods like GEOSGeom_genNumcoordinates are defined like this:

/* Return -1 on exception */
extern size_t GEOS_DLL GEOSGetNumCoordinates(const GEOSGeom g1);

However, size_t is defined as:

typedef unsigned int size_t

So returning -1 isn't such a good idea is it? You'd have to type cast to an int first to check the result.

Charlie





Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to