Learn R Programming

rsMove (version 0.2.4)

checkOverlap: checkOverlap

Description

Reports on how much two spatial objects overlap.

Usage

checkOverlap(x, y)

Arguments

x

A spatial object.

y

A spatial object.

Value

A two element numeric vector.

Details

Uses intersect to estimate the amount of overlap between two spatial objects (i.e. x and y). The function reports on the percentage of the area in each spatial object represented by their overlap.

See Also

poly2sample

Examples

Run this code
# NOT RUN {
{

 require(raster)

 # load example probability image
 file <- system.file('extdata', 'probabilities.tif', package="rsMove")
 img <- raster(file)

 # load area of interest
 file <- system.file('extdata', 'roi.shp', package="rsMove")
 roi <- shapefile(file)

 # extract samples
 checkOverlap(img, roi)

}
# }

Run the code above in your browser using DataLab