The function rsaga.union.polygons
uses SAGA function
"Union
" to calculate the geometric union of two polygon layers. This
corresponds to the intersection and the symmetrical difference of the two
layers.
rsaga.union.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 union layer_a.
character
, path indicating where to store the output
shapefile.
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()
, required because module(s) depend(s) on SAGA
version.
Jannes Muenchow and Alexander Brenning (R interface), Olaf Conrad and Angus Johnson (SAGA modules)
Function gUnion()
in rgeos
package can also be used for joining
intersecting polygon geometries. However,
rsaga.union.polygons()
will be usually much faster,
especially when joining thousands of polygons.