|
Re: Some C API Issues: msg#00090gis.geos.devel
(1) and (2) committed. For (3) the returned object is really a Geometry (a Polygon) so nothing should blow up. About exposing the Envelope class, what would you use it for exactly ? (next you'd want indexes...) We should really provide unit tests for the C api at this stage. --strk; On Sat, Jun 24, 2006 at 10:21:03PM -0600, Charlie Savage wrote: > Some issues with the c api. > > > 1. It looks like GEOSCoordSeq_getOrdinate is missing a coordinate > sequence as its first parameter. > > > =================================================================== > RCS file: /home/cvs/postgis/geos/capi/geos_c.cpp,v > retrieving revision 1.24 > diff -u -r1.24 geos_c.cpp > --- capi/geos_c.cpp 5 Jun 2006 15:36:34 -0000 1.24 > +++ capi/geos_c.cpp 25 Jun 2006 02:59:02 -0000 > > -extern "C" int GEOS_DLL GEOSCoordSeq_getOrdinate(unsigned int, unsigned > int, double *); > +extern "C" int GEOS_DLL GEOSCoordSeq_getOrdinate(CoordinateSequence *, > unsigned int, unsigned int, double *); > > > 2. There is an enum GEOSGeomTypeId in geos_c.h but also a method with > the same name. This makes VC++ 2005 unhappy. Can the enum be renamed > to something like GEOSGeomTypes? > > > 3. You can get an Envelope from a Geometry, but its returned to you as > a GEOSGeom. But an Envelope is not a geometry. If you get one, and > then use it some of the methods like Intersects, won't things blow up? > Also, in my existing code I make use of a fair bit of the Envelope api > (width, height, etc.). Any chance this can be exposed in the C api? > > Thanks, > > Charlie |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Assertions in CoordinateArraySequence: 00090, strk |
|---|---|
| Next by Date: | Re: Geos - multithreading and error handling: 00090, strk |
| Previous by Thread: | Some C API Issuesi: 00090, Charlie Savage |
| Next by Thread: | Re: Some C API Issues: 00090, Mateusz Loskot |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |