[R-sig-Geo] writeRaster error: unknown file format
pecardoso
pauloeducardoso at gmail.com
Fri Jan 24 16:53:13 CET 2014
Hello all. Thanks for your time.
Robert, True about format, but 'IDRISI' file format is also there and I've
used format = 'IDRISI' ultil recently, and it was working just fine with
exactly the same procedure.
About running scripts from RStudio and R console, I'm not skilled enough to
understand the differences.
in my system, writeFormats() returns:
name long_name
[1,] "raster" "R-raster"
[2,] "SAGA" "SAGA GIS"
[3,] "IDRISI" "IDRISI"
...
[36,] "RST" "Idrisi Raster A.1"
With older versions of raster package, the argument format='IDRISI' also
produced 'IDRISI Raster A.1' files.
Latest version in fact is not accepting format = 'IDRISI' for the
RasterLayer created from reading the 16 bis Landsat TIF file and is
returning the error:
Error in .setFileExtensionHeader(filename, filetype) : unknown file format
Changing to format = 'RST' isn't better. I get the error:
Error in .local(.Object, ...) : Unable to create dataset
The behavior is the same running this from within RStudio and from the R
console.
Maybe with the same data it would be better, or reproducible.
Here
<https://www.dropbox.com/s/is2td4t6uwc44fq/LC81810682013122LGN01_B2.TIF>
the link to the landast image (107Mb).
For the resulting RasterLayer
GDALinfo('...\\LC81810682013122LGN01_B2.tif')
rows 7311
columns 7521
bands 1
lower left origin.x 370485
lower left origin.y -1388715
res.x 30
res.y 30
ysign -1
oblique.x 0
oblique.y 0
driver GTiff
projection +proj=utm +zone=33 +datum=WGS84 +units=m +no_defs
file C:\Users\Strix\Downloads\LC81810682013122LGN01_B2.tif
apparent band summary:
GDType hasNoDataValue NoDataValue blockSize1 blockSize2
1 UInt16 FALSE 0 1 7521
apparent band statistics:
Bmin Bmax Bmean Bsd
1 0 65535 NA NA
Metadata:
AREA_OR_POINT=Point
Warning message:
statistics not supported by this driver
Eddie, I generally do not use setwd when sharing scripts with colleagues. I
usually define paths to some shared folder. It's not working anyway. From my
sessionInfo string you will se that I'm running rgdal.
Could it be something with rgdal (and gdal) installation after package
update? For a similar problem
<http://r-sig-geo.2731867.n2.nabble.com/problem-with-writeRaster-and-GeoTIFF-format-td7583541.html>
users suggests re-install of rgdal, gdal and its libraries.
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/writeRaster-error-unknown-file-format-tp7585627p7585632.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list