Lazily reads a MapBiomas Fuego (Fire) Peru raster from a given
sub-product, hosted as a GeoTIFF on Google Cloud Storage. Only the bytes
required for the requested extent are downloaded (via GDAL's
/vsicurl/ driver). Optionally crops and masks the raster to an
area of interest.
Arguments
- product
Character. One of the products listed in
get_mapbiomas_peru_fire_products, e.g."annual_burned","year_last_fire","frequency_burned".- year
Integer. For
"annual"products (seeget_mapbiomas_peru_fire_products), the year of the map (available from1999). For"range"products (accumulated_*,frequency_burned), the end year of the accumulated period, which always starts in2013.- crop_to
Optional. An
sf/sfcobject,SpatVector, orSpatExtentdefining the area of interest. IfNULL(default), the full raster for Peru is returned.- collection
Integer. MapBiomas Fuego Peru collection number. Default is
1(currently the only collection available).
Examples
# \donttest{
library(geoidep)
lima <- get_departaments("LIMA")
#>
|
| | 0%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|==== | 5%
|
|===== | 7%
|
|===== | 8%
|
|=========== | 16%
|
|============ | 17%
|
|===================== | 30%
|
|====================== | 32%
|
|======================== | 35%
|
|========================= | 35%
|
|========================= | 36%
|
|========================== | 37%
|
|=========================== | 39%
|
|==================================== | 51%
|
|============================================ | 63%
|
|============================================= | 65%
|
|============================================== | 66%
|
|======================================================= | 78%
|
|=========================================================== | 85%
|
|==================================================================== | 97%
|
|======================================================================| 100%
# Annual burned area for 2024, cropped to Lima
burned_2024 <- get_mapbiomas_peru_fire(
product = "annual_burned",
year = 2024,
crop_to = lima
)
# Accumulated burned area 2013-2024
accumulated <- get_mapbiomas_peru_fire(
product = "accumulated_burned",
year = 2024,
crop_to = lima
)
# }