[R-sig-Geo] rgeos within Rcpp

Lucas Godoy |uc@@d@c@godoy @end|ng |rom gm@||@com
Mon May 11 19:34:25 CEST 2020


Dear all,

Is it possible to use *rgeos* functions within an Rcpp script?
I know that *rgeos* is an interface to GEOS, but I am working with
*SpatialPolygons
(sp)* and I do not know how to convert files from an S4 class in Rcpp to a
class compatible with the GEOS functions.

Does the *sf* package make this kind of task easier?

(P.S.: I am asking because I am working with Monte Carlo tests, and almost
everything is done from within Rcpp, but when I need to calculate distances
(gDistance) or intersections (gIntersetion) between polygons I'm forced to
call the R functions.)

Thank you in advance,
Lucas.

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list