View source: R/spatial_manipulation.R
intersect_rgeos | R Documentation |
Produce a spatial polygons data frame of the intersection of two spatial polygons data frames, inheriting all the variables from each. In the case of duplicate variables between the two, those in polygons2@data
will have a "2" appended to differentiate them. This uses rgeos::ginstersect
and assumes that the row names in both polygons1
and polygons2
DO NOT HAVE SPACES.
intersect_rgeos(
polygons1,
polygons2,
keep_outer = FALSE,
projection = NULL,
makevalid = TRUE,
force = FALSE,
verbose = FALSE,
scale = 1e+05
)
polygons1 |
Spatial polygons data frame. One of the set of polygons to intersect. If |
polygons2 |
Spatial polygons data frame. One of the set of polygons to intersect. |
keep_outer |
Logical. If |
projection |
Optional |
verbose |
Logical. If |
scale |
Numeric. A value to be passed to |
A spatial polygons data frame consisting of the unique intersections of polygons1
and polygons2
with all the variables from both in the projection of either projection
or polygons1
. If there were variable names that occurred in both, those from polygons2
will have a "2" appended.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.