Skip to content
Prev 20285 / 29559 Next

writeRaster error: unknown file format

Robert,

Thank you for your message. First thing, raster package is simply amazing.

I've installed raster v2.2-16.
I've imported the TIF from the dropbox link with

i.l8 <- raster('D:\\Dropbox\\Public\\LC81810682013122LGN01_B2.TIF',
               package = "raster")
class       : RasterLayer
dimensions  : 7311, 7521, 54986031  (nrow, ncol, ncell)
resolution  : 30, 30  (x, y)
extent      : 370485, 596115, -1388715, -1169385  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=33 +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0
data source : D:\Dropbox\Public\LC81810682013122LGN01_B2.TIF
names       : LC81810682013122LGN01_B2
values      : 0, 65535  (min, max)

I'm also able to generate a RST file from the rasterLayer i.l8 with

writeRaster(band, filename = 'D:\\l8_b2.rst', format = 'IDRISI', overwrite
= TRUE)

IDRISI Taiga can read the RST file but the file format is tagged as "IDRISI
x A1" and not "IDRISI Raster A1"

I still not being able to generate the RST file with

writeRaster(band, filename = 'D:\\l8_b2.rst', format = 'RST', overwrite =
TRUE)

Error in .local(.Object, ...) : Unable to create dataset

But it works fine with writeGDAL:

writeGDAL(as(i.l8, "SpatialGridDataFrame"), fname = "D:\l8_gdal.rst",
drivername = "RST")

IDRISI Taiga read it and tag the file format as "IDRISI Raster A1", just
like the ones generated internally with import functions from IDRISI.

writeRaster with format = 'IDRISI' generetes a 230,732 MB idrisi file while
a 214,790 MB file is generated with writeGDAL and drivername = 'RST'

I can't figure out why.



Paulo Eduardo Cardoso



2014-01-27 Robert Hijmans [via R-sig-geo] <
ml-node+s2731867n7585643h37 at n2.nabble.com>
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/writeRaster-error-unknown-file-format-tp7585627p7585646.html
Sent from the R-sig-geo mailing list archive at Nabble.com.