Description Usage Arguments Value Examples
Generates sf objects with attributes for Table values. Optionally exports polygon as shapefile.
1 2 |
pBasin |
Subbasin cover polygons. |
pBasinSp |
Extent polygon covering subbasins in species range of occurance. |
pBasinC |
PA cover in subbasins with country. |
riv |
River lines. |
rastAc |
Raster brick with acessibility values. |
make_shape |
Logical (TRUE/FALSE). Generate polygon shapefiles of ...... |
List with objects of class sf with attribute data used to generate result tables (epsg = 3395). Optionally writes shapefiles. riverb (sf.rivb) = 4629 river lines with basin attributes. riverbc (sf.rivb2) = 4791 river lines with basin and country attributes. riverpbc (sf.riv) = 2519 river lines with PA class, basin and country. basinc (sfclean3395c) = 71 polygons with basin and country. basinp (pac3395) = 169 polygons with PA class basin and country.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## 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 .
# This function needs 4 shapefiles as listed below.
# Subbasin cover polygons
B <- system.file("shape/amazon_orinoco.shp", package="cmartr")
# Extent polygon covering subbasins in species range of occurance.
# From prepBasin.R .
Bsp <- system.file("shape/speciesBasin.shp", package="cmartr")
# PA cover in subbasins with country. From prepPAcountry.R
BC <- system.file("shape/basinpacover.shp", package="cmartr")
# River lines.
rin <- system.file("shape/sa_strwgs84.shp", package="cmartr")
# Brick with acessibility raster
ras1 <- system.file("raster/uas.grd", package="cmartr")
# run, 4 - 5 hours depending on computer and memory allocation
lsf <- prepTabcover(pBasin = B, pBasinSp = Bsp,
pBasinC = BC, riv = rin, rastAc = ras1, make_shape = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.