Anyone have a hint in how to use geos inside Rcpp functions (I'm building an R package)? Actually, I'm looking for a better approach then this:
Rcpp::Environment rgeos_env = Environment::namespace_env("rgeos");
Rcpp::Function Dist = rgeos_env["gDistance"];
Contextualizing, I want to calculate distances between spatial polygons, but I do that a lot of times (Monte Carlo Tests) and I want to improve the speed of my code.