getCDL_bbox | R Documentation |
getCDL_bbox
retrieves a CDL raster object within a bounding box for a set of years.
getCDL_bbox(
year,
bbox,
fileName,
res,
crs = "EPSG:5070",
https = TRUE,
alternativeUrl,
ssl.verifypeer = TRUE,
returnType = "raster"
)
year |
A numerical vector. A set of years of CDL data to download. |
bbox |
An array defining a bounding box of length four. Defining the two points that form the box by latitude then longitude, in that order. The furthest north west pair is entered first. |
fileName |
An optional string indicating where the file should be saved to, default is an R tempfile. |
res |
An optional array of length two defining the pixel resolution in meters, default is 30m. |
crs |
An optional string containing the coordinate reference system, default is EPSG:5070 (Albers is EPSG:5070). |
https |
Legacy https, all traffic uses https, if you need http provide alternative url. |
alternativeUrl |
An optional string containing an alternative url. |
ssl.verifypeer |
An optional boolean to turn on and off ssl verfication, default is on. |
returnType |
An optional parameter to select to return either 'raster' or 'terra' based raster files. |
A raster object containing the contents of a bounding box.
Jonathan Lisic, jlisic@gmail.com
Jemma Stachelek, stachel2@msu.edu
## Not run:
# Get data for California in 2020
bbox <- c(130783,2203171,153923,2217961)
resx <- 30
resy <- 30
year <- 2020
crs <- 'epsg:102004'
getCDL_bbox(year,bbox,res=c(resx,resy),crs=crs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.