The function rsaga.intersect.polygons
calculates the
geometric intersection of two overlayed polygon layers using SAGA module
"Intersect
".
rsaga.intersect.polygons(
layer_a = NULL,
layer_b = NULL,
result = NULL,
split = FALSE,
load = NULL,
env = rsaga.env()
)
The function saves the output shapefile to the path indicated in
function argument result
.
A character
string representing the path to a polygon
shapefile.
A character
string representing the path to a polygon
shapefile with which to intersect layer_a.
A character
string indicating where the resulting
shapefile should be stored.
If TRUE
, multipart polygons become separated polygons
(default: FALSE).
Deprecated, will be removed in a future release. Ignored
if FALSE
, and causes an error if TRUE
(default: NULL).
RSAGA geoprocessing environment created by
rsaga.env()
.
Jannes Muenchow and Alexander Brenning (R interface), Olaf Conrad and Angus Johnson (SAGA modules)
Function gIntersection
in rgeos
package can also be used to
define the intersection between two polygon layers. However,
rsaga.intersect.polygons()
will be usually much faster,
especially when intersecting thousands of polygons.