[R-sig-Geo] Confusing error message by raster package
Agustin Lobo
alobolistas at gmail.com
Tue Oct 27 10:22:43 CET 2009
Hi!
I entered
> r1 <- raster("SDIM160.tif", band=1)
Error in .rasterObjectFromFile(x, band = band, values = values, proj =
proj, :
Cannot create RasterLayer object. There is a '.gri' file but no
'.grd' file. GDAL does not recognize the '.gri' file
I was very confused by the error message, after all the problem was that
the file simply does not exist, it was misspelled:
> r1 <- raster("SDIM0160.tif", band=1)
CPL Warning 1: TIFFReadDirectory:Unknown field with tag 37717 (0x9355)
encountered
The error message in rgdal is correct:
> readGDAL("SDIM160.tif")
CPL ERROR 4: `SDIM160.tif' does not exist in the file system,
and is not recognised as a supported dataset name.
Error in .local(.Object, ...) :
`SDIM160.tif' does not exist in the file system,
and is not recognised as a supported dataset name.
Could the error message be modified?
Thanks
Agus
More information about the R-sig-Geo
mailing list