-
Notifications
You must be signed in to change notification settings - Fork 52
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
Unrecognized or altered CRS following writeRaster() #232
Comments
This all seems to work fine for me. I changed
|
I'm still encountering the issue. Something related to warning # 2 of writeRaster()?
I can use the sf argument instead, but once again the CRS doesn't reload:
Session info:
|
you still are in a "dirty session" with lots of packages loaded. It looks like you are using Rstudio. I do not know if that is the issue, but it might be. You could use "Terminate R" (restart does not do much), but would still need to make sure that no old workspace is loaded, you can use |
The error still occurs using the latest version of RStudio and a brand new project. From the console:
However, from the terminal side of RStudio it works as expected:
Based on these results, it would appear the problem originates with RStudio. Closing this and opening a new issue at rstudio/rstudio#10052. |
I doubt that it directly related to R studio. It is almost certainly because of an old version of sp or rgdal being used. |
I'm working with current package versions at present. This was all freshly installed this morning.
And I now find this fails even in a fresh launch of R.exe:
Comments by @kevinushey at rstudio/rstudio#10052 indeed support the notion that RStudio is not to blame. |
That again points at your
|
From RStudio Console:
From Rstudio Terminal:
Behaviour is somewhat erratic. Before this attempt, both console and terminal produced errors. Sometimes the terminal behaves as expected, but it never seems to work in the console. |
Can you make sure to start R studio with no open tabs. That is, close them all, then run
The reason for all this is that you appear to have the correct versions of the packages, but I suspect that an old version is stull being used because R studio tries to be smart. |
If this does not help, then you should probably ask for help over at |
Indeed, thank you Robert. I have done as you instructed, with only the current version of R and all up-to-date packages installed, no open tabs or lingering session data. Result is consistent lately: sp::CRS("EPSG:3005") works in R, but does not work in RStudio. I have posted anew at edzer/sp#111. |
Very mysterious. Sorry not to be able to provide more help |
@rhijmans you have always been a great help to me sir! Next step may be to uninstall and subsequently reinstall RStudio... |
Issue # 199 (WKT2 string change after reading GeoTIFF file created with raster) appears to have resurfaced:
When I specify the crs using the PROJ.4 argument, I get the following warning, and the saved raster is returned with an incorrect EPSG code:
Using the EPSG # to define crs(x) also no longer works (using original example by @florisvdh):
My computing environment:
The text was updated successfully, but these errors were encountered: