[geos-devel] GEOS C API Suggestions

Frank Warmerdam warmerdam at pobox.com
Sat Oct 15 23:13:29 EDT 2005


Circa Sept26 I grabbed GEOS for an effort to integrate the C API
with OGR (instead of the C++ API).  I have gotten back to that
project today and gotten the updated OGR to build but there are
still unexplained crashes.

I haven't tracked that all down, but I do have a few suggestions I
thought I should make while I have stuff fresh in my mind.

 1) The Distance operation is missing and would be quite useful.

 2) Why is the WKB buffer of type "const char *" instead of "unsigned
     char *" or some similar "byte oriented" type?

 3) Within geos_c.h I think it should use produce it's own extern "C"  {}
     around all the declarations if included by a C++ module.

 4) I think the GEOS C entry points should be DLL exported.

 5) I think it would be nice to provide entry points to directly
     create and destroy geometries however that is not really critical.
     However, I found it odd that calls like GEOS_GetNumCoordinate()
     and GEOSGetNumGeometries() were provided when no calls
     to get coordinates or geometries were provided.

I appologise if my comments are out of date.

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

More information about the geos-devel mailing list