rgeos within Rcpp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

rgeos within Rcpp

Lucas Godoy
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
(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,

        [[alternative HTML version deleted]]

R-sig-Geo mailing list
[hidden email]