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

Roger Bivand Roger.Bivand at nhh.no
Wed Feb 10 06:00:31 EST 2010


On Wed, 10 Feb 2010, strk wrote:

> On Wed, Feb 10, 2010 at 10:46:33AM +0100, Roger Bivand wrote:
>> Continuing to try to interface R and GEOS (CAPI), I am puzzled that
>> GEOSSymDifference() and GEOSIntersection() seem to require input objects
>> to be "Geometry must be a Point or LineString".
>
> Sounds like an horrible bug, if confirmed.
> Could you file a ticket with accompaining smallest C testcase showing it ?

Sorry, as before, I'm working on interfacing to R, so GEOM objects are 
created and validated from there. If there is a workhorse main() providing 
a way of reading input or taking input from hardcoded WKT strings, I'll 
use it, but I'd prefer not to write it - last time the testcase I wrote 
was worse than and did not cover the problem. Just a simple boilerplate so 
that my coding of it isn't the problem, if you see what I mean.

I've got quite a long way with the interface, but am hitting things I just 
don't grasp. I think that the error message is stale in my 
__errorHandler() - but cannot see why, so the error message may be 
distracting. GEOSSymDifference() certainly bailed out when passed two 
MULTIPOLYGON objects, same with two POLYGON objects, and does process with 
two LINEARRING objects.

I've tried to go through GEOSPolygonize() to put the MULTILINESTRING 
together again, and am analysing what has happened, but think that the 
output has lost hole attributions, so needs running through GEOSContains 
or similar.

Thanks!

Roger

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

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the geos-devel mailing list