prepPAcover: Prepare polygons for PAcover calculations

Description Usage Arguments Details Value Examples

View source: R/prepPAcover.R

Description

Generates files for subsequent use. Optionally exports polygon as shapefile "pacover.shp".

Usage

1
2
prepPAcover(pPA = NA, pBasin = NA, pBasinSp = NA,
  make_shape = FALSE)

Arguments

pPA

Input file with protected area polygons.

pBasin

Input file with basin polygons.

pBasinSp

Input file with polygon covering basins in species range of occurance.

make_shape

Logical (TRUE/FALSE). Generate polygon shapefile of protected areas in 3 classes across basins in species range.

Details

To remove overlapping areas with different PA classifications. These are big areas and processing takes time: 4 - 5 hours on a laptop.

Value

Polygons of area covered by protected areas. Optionally exports polygon as shapefile "pacover.shp".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Load shapefiles needed
# These large files are not available via github package. 
# Download "shapes.zip" from :
# https://drive.google.com/open?id=1QQArA7pPLemUVQTKx7PxigsQXKpOG0YQ
# For the code below to work, 
# extract files in "shapes.zip" to cmartr/inst/shape .
Bsp <- system.file("shape/speciesBasin.shp", package="cmartr")
PA <- system.file("shape/wdpaselect.shp", package="cmartr")
B <- system.file("shape/amazon_orinoco.shp", package="cmartr")
pacover <- prepPAcover(pPA = PA, pBasin = B, pBasinSp = Bsp)

## End(Not run)

darrennorris/cmartr documentation built on May 23, 2020, 10:10 p.m.