I am using GRASS 6.4~rc5-2 on Ubuntu 9.10. I am trying to export a DCELL
raster map to both a byte formatted and a UInt16 formatted Geotiff file.
The UInt16 formatted file shows nothing when I try to open the file, and
the byte formatted file is in black and white only. I can't seem to get
color. The original GRASS raster uses the "ndvi" color scheme.
I am using GRASS 6.4~rc5-2 on Ubuntu 9.10. I am trying to export a DCELL
raster map to both a byte formatted and a UInt16 formatted Geotiff file.
The UInt16 formatted file shows nothing when I try to open the file, and
the byte formatted file is in black and white only. I can’t seem to get
color. The original GRASS raster uses the “ndvi” color scheme.
On Fri, Apr 2, 2010 at 11:00 AM, William Hudspeth
<bhudspeth@edac.unm.edu> wrote:
Hello,
I am using GRASS 6.4~rc5-2 on Ubuntu 9.10. I am trying to
export a DCELL
raster map to both a byte formatted and a UInt16 formatted
Geotiff file.
The UInt16 formatted file shows nothing when I try to open the
file, and
the byte formatted file is in black and white only. I can't
seem to get
color. The original GRASS raster uses the "ndvi" color scheme.
On Fri, Apr 2, 2010 at 5:00 PM, William Hudspeth <bhudspeth@edac.unm.edu> wrote:
Hello,
I am using GRASS 6.4~rc5-2 on Ubuntu 9.10. I am trying to export a DCELL
raster map to both a byte formatted and a UInt16 formatted Geotiff file.
The UInt16 formatted file shows nothing when I try to open the file, and
the byte formatted file is in black and white only. I can't seem to get
color. The original GRASS raster uses the "ndvi" color scheme.
NDVI ranges (theoretically) from -1 to +1. Hence not much information
would survive then stored in 0..255 (8 bit) or 0..65535 (16bit UInt).
Solutions are
- select Float32 (but GeoTIFF won't support a color table)
- Add +1 and multiply with 100 and adjust the color table accordingly,
then export to 8bit
- choose a different format which supports color tables in floating
point format,
check http://www.gdal.org/formats_list.html
- maybe more...
Another (strange) option is to export with "r.out.ascii" and convert
into GeoTIFF with gdal_translate. For example, given that your ascii
rasters have ".asc" extension:
for x in *.asc; do gdal_translate (your-options-go-here) $x $x.tif; done
(Don't remember from where I stole this hint).
Nikos
On Fri, Apr 2, 2010 at 11:00 AM, William Hudspeth
<bhudspeth@edac.unm.edu> wrote:
Hello,
I am using GRASS 6.4~rc5-2 on Ubuntu 9.10. I am trying to
export a DCELL raster map to both a byte formatted and a
UInt16 formatted Geotiff file.
The UInt16 formatted file shows nothing when I try to open the
file, and the byte formatted file is in black and white only.
I can't seem to get color. The original GRASS raster uses the
"ndvi" color scheme.
Thanks, Bill