On Wed, 10 Feb 2010, strk wrote:
On Wed, Feb 10, 2010 at 12:00:31PM +0100, Roger Bivand wrote:
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.
Thanks. Could you please clarify:
Are GEOSSymDifference() and GEOSIntersection() intended to take at least
POLYGON inputs, and then return POLYGON output, or not?
Sure, we have an XML format for testcases targetting the C++ interface
(xmltester), and a framework for C-API too (see tests/unit/capi/*).
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.
Sorry not to be up to speed!
Roger
PS. I'll look at the PostGIS code you mention - for now for two
intersecting linear rings, GEOSSymDifference() returns all the LINESTRING
objects which Poligonizer makes into the parts that are not shared (OK)
and all the intersecting parts (not OK).
--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.biv...@nhh.no
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel