[geos-devel] What do GEOSSymDifference and GEOSIntersection (CAPI) do?

strk strk at keybit.net
Wed Feb 10 08:05:47 EST 2010


On Wed, Feb 10, 2010 at 12:35:46PM +0100, Roger Bivand wrote:

> Are GEOSSymDifference() and GEOSIntersection() intended to take at least 
> POLYGON inputs, and then return POLYGON output, or not?

No. They are supposed to work also on linear and puntual geometries.

> As far as I can see, all the files there are C++, not C. I need C, not 
> C++, please. Just the #include, main(), and a place in the main to put the 
> data (say as WKT strings) and the function call, and a place to put the 
> output to screen. I did meet Bjarne Stroustrup in 1987, but that was 
> enough! Just setting up initGEOS(), etc., portably is hard.

I completely understand your point of view.
That's why I push hard for the C-API in the first place :)

Just, as a matter of fact, the actual workhorse is written
in C++, so *if* a bug is found, the usual place to start
for figuring out the culprint it is in object-oriented-land.

In any case, the xmltester script takes XML files as input
so you need no C++ nor C to prepare a testcase for your
situation. Doing so would tell you if Difference and Intersection
functions are broken at the low level.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://foo.keybit.net/~strk/services.html


More information about the geos-devel mailing list