[R-sig-Geo] Maintaining band names in multiband raster objects

Wall, Wade A ERDC-RDE-CERL-IL Wade.A.Wall at usace.army.mil
Thu Nov 20 16:21:20 CET 2014


Hi all,

I am trying to keep band names from imported netcdf files intact when I export them using the writeRaster() function from the Raster package, but they are removed and replaced with "Band1, band2, band3, etc."

The .nc files I am importing are located at http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#Welcome

When I import the .nc files, names(raster object) yields band names such as x2006.01.15 (January 15 2006). These names are interpretable and I would like to preserve them.

Is there a way to specify band names for exported raster objects in R? I have seen posts suggesting it is not possible, but if they can be read, then they should be able to be written.

Wade A. Wall
US Army ERDC-CERL
P.O. Box 9005
Champaign, IL  61826-9005
1-217-373-4420
Wade.A.Wall at usace.army.mil<mailto:Wade.A.Wall at usace.army.mil>




	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list