Thanks for all your work on this package, it has been super helpful for pulling vector layers into R and I recently decided to give it a try for some raster layers that I'm interested in using for an analysis. However, I seem to be running into an issue with the 'get_map_layer' function.
I'm trying to pull burn severity rasters from MTBS for the Sierra Nevada region. Here's the code:
library(tidyverse)
library(sf)
library(arcpullr)
# create sf object; sierra nevada ecoregion
sierra_nevada_sf <-
get_spatial_layer(
url = 'https://edits.nationalmap.gov/arcgis/rest/services/landforms/landforms_epa_eco_regions/MapServer/0',
where = "US_L3NAME = 'Sierra Nevada'"
) |>
# just use a simple bounding box for now
st_bbox() |>
st_as_sfc() |>
st_as_sf()
# query mtbs rasters
ca_fire <- get_map_layer('https://apps.fs.usda.gov/arcx/rest/services/RDW_Wildfire/MTBS_CONUS/MapServer', sierra_nevada_sf)
Which gives me the following error:
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file.
In addition: Warning message:
`C:/Users/jmwin/AppData/Local/Temp/RtmpcZctRJ/file871c40e54c95' not recognized as a supported file format. (GDAL error 4)
Initially, I was hoping to download each year of burn severity data separately. It seems this might be possible according to a previous issue, but I get the same error above:
# doesn't work either; 1984 data
ca_fire <-
get_map_layer(
'https://apps.fs.usda.gov/arcx/rest/services/RDW_Wildfire/MTBS_CONUS/MapServer/',
sierra_nevada_sf,
layers = 'show:38'
)
This led me back to the vignette, but I also get the error when trying to reproduce the Wiscland2 code:
# wi_landcover is part of the package; this doesn't work
wi_landcover2 <- get_map_layer(landcover_url, wis_poly)
Thanks for all your work on this package, it has been super helpful for pulling vector layers into R and I recently decided to give it a try for some raster layers that I'm interested in using for an analysis. However, I seem to be running into an issue with the 'get_map_layer' function.
I'm trying to pull burn severity rasters from MTBS for the Sierra Nevada region. Here's the code:
Which gives me the following error:
Initially, I was hoping to download each year of burn severity data separately. It seems this might be possible according to a previous issue, but I get the same error above:
This led me back to the vignette, but I also get the error when trying to reproduce the Wiscland2 code:
Here's my session info if it is helpful:
Thanks!