rsaga.intersect.polygons: Spatial intersection of two polygon layers

View source: R/RSAGA-modules.R

rsaga.intersect.polygonsR Documentation

Spatial intersection of two polygon layers

Description

The function rsaga.intersect.polygons calculates the geometric intersection of two overlayed polygon layers using SAGA module "Intersect".

Usage

rsaga.intersect.polygons(
  layer_a = NULL,
  layer_b = NULL,
  result = NULL,
  split = FALSE,
  load = NULL,
  env = rsaga.env()
)

Arguments

layer_a

A character string representing the path to a polygon shapefile.

layer_b

A character string representing the path to a polygon shapefile with which to intersect layer_a.

result

A character string indicating where the resulting shapefile should be stored.

split

If TRUE, multipart polygons become separated polygons (default: FALSE).

load

Deprecated, will be removed in a future release. Ignored if FALSE, and causes an error if TRUE (default: NULL).

env

RSAGA geoprocessing environment created by rsaga.env().

Details

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.

Value

The function saves the output shapefile to the path indicated in function argument result.

Author(s)

Jannes Muenchow and Alexander Brenning (R interface), Olaf Conrad and Angus Johnson (SAGA modules)


RSAGA documentation built on Dec. 10, 2022, 1:12 a.m.