When trying to use the get_elev_raster from the elevatr package, I am running into an error which seems a few libraries deep. As a basic reprex:
library(sf) library(elevatr) luxembourg <- readRDS(url("https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_LUX_0_sf.rds")) %>% sf::st_as_sf() elevation <- get_elev_raster(luxembourg, z = 4) old-style crs object detected; please recreate object with a recent sf::st_crs() old-style crs object detected; please recreate object with a recent sf::st_crs() Error in sp::CRS(SRS_string = "EPSG:4326") : no arguments in initialization list
(the old style crs warnings this throws for me doesn't seem to be related to the error per se but might be useful in diagnosing)
When running similar on my local R version everything works perfectly, however, for my actual use case I'm running this on RStudio server using a GCP virtual machine.
I can't seem to re-find it, but in the issues for sp:: I think it was pointed out that this error is actually from rgdal. Both my local and vm rgdal versions are 1.5-23.
My VM gdal is GDAL 2.4.0, released 2018/12/14 My local gdal is GDAL 3.0.4, released 2020/01/28 so I imagine this is something to do with things, but grateful for any advice!!