[geos-devel] GEOSException, C-API and rgeos running GEOS under R

Roger Bivand Roger.Bivand at nhh.no
Wed Aug 22 01:35:06 PDT 2018


The rgeos interface to GEOS uses the C API and context handles. We see 
valgrind leaks 
following exceptions (like passing invalid polygons to the intersection 
function), also when finishGEOS_r() is called.

Is there any way to free objects in the custom error handler? Or should I 
rely on NULL being returned? How can I distinguish between a NULL returned 
after an exception and a non-exception NULL?

We are seeing increases in messy input data, so it feels as though 
exceptions are being met more often.

Any input welcome - I'm also looking at PostGIS code using GEOS_FREE, but 
have not yet found the custom error handler - we still need the message.

Roger

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en


More information about the geos-devel mailing list