A raster object containing the contents of a bounding box.
Arguments
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.
if (FALSE) {
# Get data for California in 2020bbox <- c(130783,2203171,153923,2217961)
resx <- 30
resy <- 30
year <- 2020
crs <- 'epsg:102004'getCDL_bbox(year,bbox,res=c(resx,resy),crs=crs)
}