[R-sig-Geo] help--raster::writeRaster does not save the layer name in file

akjha akjha at iirs.gov.in
Fri Jun 29 07:29:42 CEST 2012


Hi List,

I have a rasterstack with 10 layer
I have assigned names to these layer using layerNames(s) =
c('band1',band2',.....'band10')

but while using the writeRaster as
writeRaster(s,filename="raster.tiff",format='GTiff',options="INTERLEAVE=BAND",overwrite=FALSE)

does not save the layer names in tiff file. As a result while reading this
file again using 

"back<-stack(raster.tiff)"

I get the layer names as raster.tiff.1 raster.tiff.2 as so on.

I can i make sure that the file saved when read back will have the layer
name as band1, band2......

Thanks & Regards
AKJ

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/help-raster-writeRaster-does-not-save-the-layer-name-in-file-tp7580360.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list