-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA #32
Comments
Hi, this looks like it's realted to this issue: Can you share what version of elevatr you have installed with: Also, do you mind sharing: It seems that this is likely due to some outdated packages. If we figure out what it is then I can add it as a minimum dependency on install. |
packageVersion('elevatr') [1] ‘0.4.1’ sessionInfo()
Matrix products: default locale: attached base packages: loaded via a namespace (and not attached): |
Can you load rayshader and rayvista before running session info, please?
|
library(rayshader) R version 4.1.2 (2021-11-01) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
Thanks! and how about:
|
packageVersion('sp') ‘1.4.6’ |
okay, that is up to date... can you also let me know the output from the following:
and what is printed when you load sf with:
|
lapply(c('sp','raster','sf', 'rgdal'), FUN = packageVersion) [[2]] [[3]] [[4]] library(sf)
rgdal: version: 1.5-27, (SVN revision 1148) |
Okay, that all looks okay to me (which is weird). |
sp::CRS(SRS_string = "EPSG:4326") Error in sp::CRS(SRS_string = "EPSG:4326") : NA |
OKay so this is the issue and I don't know why it is happening on your system. For me this returns the following:
I'm not sure how to fix this on my end at the moment I'm afraid. It appears to be a problem with underlying spatial libraries. But seeing as your libraries all seem up to date, this is very strange... I'll keep track of the issues in {elevatr} and update if there is any news. I'm also working on a different package that will avoid some of these issues but it it still needs work - I can keep you posted on that. Cheers |
One last dash I tried an alternative to encode this CRS arguments: +proj=longlat +datum=WGS84 +no_defs
Can It mean anything |
Yes, basically {sf} resolves many of these legacy PROJ issues I think - however {elevatr} is still using {sp}. I think it is due to be updated at some point but not sure when. Unforunately I don't have the time to track down the issues in elevatr but may be worth testing some of the elevatr functions and reporting in the issue that I referenced earlier on. If you're really keen to get plotting with something you are welcome to try out the dev version of {raytrix} https://github.com/h-a-graham/raytrix The following should work but I can't guarentee anything as, like I said, this is still a work in progress.
Sorry that we can't find a solution right now - I'll leave this open and hopefully we can fix it in the near future... |
The raytrix works I will stick with this for the time being, Thank you, please keep me updated and cheers 👍 |
Umm Hello I'm using Windows I tried to run The following code example It gave me a Lot of errors
Line of code
library(rayshader)
library(rayvista)
.lat <- 57.219566
.long <- -6.092690
cuillins <- plot_3d_vista(lat = .lat, long = .long, phi=30)
render_label(heightmap= cuillins, text='Bla Bheinn: 928 m', lat = .lat,
long=.long, extent = attr(cuillins, 'extent'),altitude=600,
clear_previous = T, zscale = 2)
render_compass()
render_scalebar(limits=c(
round(dim(cuillins)[2]*attr(cuillins, 'resolution')/1000,1)),
label_unit = 'km')
render_snapshot(clear=TRUE)
Error given
library(rayshader)
Error in render_label(heightmap = cuillins, text = "Bla Bheinn: 928 m", :
object 'cuillins' not found
Error in render_scalebar(limits = c(round(dim(cuillins)[2] * attr(cuillins, :
object 'cuillins' not found
Help Me
The text was updated successfully, but these errors were encountered: