Message-ID: <A83620D4CC4762448EFB789FD6E9BBB742BBB629@SCOMP0937.wurnet.nl>
Date: 2014-11-20T15:33:02Z
From: Loïc Dutrieux
Subject: Maintaining band names in multiband raster objects
In-Reply-To: <C1524BE4BF45454293B8DF38FB9B5ECA177DACAA@MS-EX1VKS.erdc.dren.mil>
Hi Wade,
If that's convenient for you, try to store your data in the native format of the raster package (.grd). It has the advantage of preserving layer names.
Best regards,
Lo?c
________________________________________
From: r-sig-geo-bounces at r-project.org [r-sig-geo-bounces at r-project.org] on behalf of Wall, Wade A ERDC-RDE-CERL-IL [Wade.A.Wall at usace.army.mil]
Sent: Thursday, November 20, 2014 4:21 PM
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] Maintaining band names in multiband raster objects
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]]
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo