I recently updated my GDAL version and had some issues with rgdal
, see here. I thought I fixed it, but now I'm getting this strange warning message. When I load a raster into R with the proj4string +proj=omerc +lat_0=35 +lonc=-75 +alpha=40 +k=0.9996 +x_0=0 +y_0=0 +gamma=40 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
I get this warning:
Warning message:
In .newCRS(value) :
+proj=omerc +lat_0=0 +lonc=0 +alpha=0 +k=0 +x_0=0 +y_0=0 +gamma=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs is not a valid PROJ.4 CRS string
For some reason the k
value was changed to 0. No biggie, I can change it manually. What is frustrating is that when I try to use writeRaster
I get the same error message and the CRS doesn't write to the output GeoTiff file. So when I load the GeoTiff into QGIS or R it doesn't know where to put it b/c it's no longer geo-referenced.
proj4string(input) = CRS('+proj=omerc +lat_0=35 +lonc=-75 +alpha=40 +k=0.9996 +x_0=0 +y_0=0 +gamma=40 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs')
writeRaster(input, '/home/usr/Desktop/output.tif', 'GTiff', overwrite = TRUE)
Warning message:
In .newCRS(value) :
+proj=omerc +lat_0=0 +lonc=0 +alpha=0 +k=0 +x_0=0 +y_0=0 +gamma=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs is not a valid PROJ.4 CRS string
I also tried using gdalwarp
on the command line, which runs without warning or error, but also doesn't add the CRS to the output GeoTiff file. Strange...