Closed 1johnreaves closed 7 months ago
I should note that while I can try to make things work in terra
, I'm not very proficient when working with rasters, and I'm more familiar with sf
; I appreciate the integration that stars
has with that package. If I'm able to extract data from this dataset somehow, that's good enough for me, but this seemed like a bug-worthy report given the context. Hopefully I'm not just missing something!
On plot(landCover)
I get this
what does sf_extSoftVersion()
give?
sf_extSoftVersion()
yields:
GEOS GDAL proj.4 GDAL_with_GEOS USE_PROJ_H PROJ
"3.11.2" "3.7.2" "9.3.0" "true" "true" "9.3.0"
Could you try again after installing stars
dev, using
devtools::install_github("r-spatial/stars")
??
Now it works! Thank you!
The dataset in question is a raster dataset of land cover in the United States. It's linked from the MRLC, but for consistency, the specific download that I've used is from here (http://www.cec.org/north-american-environmental-atlas/land-cover-30m-2020/), and is the TIF button at the bottom of the page. Be warned, the download is 3.7gb.
I unzipped the contents of the folder and tried to open them with the
stars
package:at which point it "loads" (via a proxy) in memory. The landCover object instantiates just fine. But when I try to use the proxy that
stars
automatically creates to plot anything (say,plot(landCover)
), or specify not to use a proxy, or anything else, I get the following error:I'm not sure what to make of this error. Running
traceback()
following the error yields the following:To see if the file was the problem, I opened it in ArcGIS Pro, which successfully displayed the raster. (It said that it'd need to process something on first import, but I didn't take note of what that was.) I tried exporting the open raster to a new .tif file, multiple times, with no luck. The
terra
package is able to open the raster all right, and displays it as well withplot()
.I have also re-downloaded the same dataset, from the same link, on the off chance that the file was corrupted on initial download. It was not. (New file also opens just fine in Arc, and with
terra
.) The same issue persists when accessing this file through Google Earth Engine and thergee
package, and yields an identical error.My session info is below for completeness: