[GRASS-user] GRASS export GeoTiff adventure :-)

Markus Metz markus_metz at gmx.de
Sat Aug 2 09:53:21 EDT 2008

Nikos Alexandris wrote:
> 1. Using r.composite and exporting with r.out.gdal gives "white" as
> nodata. Whenever I set "nodata=0" I don't get a viewable photo
Weird, it might have something to do with exporting a composite, it 
should work on single bands and groups.
> 3. GeoTiff metadata are lost always (?) while exporting with
> r.out.gdal. 
Also when checking with gdalinfo?
> 4. The createopt="INTERLEAVE=PIXEL" is not respected by r.out.gdal (?)
I would not change the default settings of gdal until I have good reason 
to do so.
> 6. Is it better to export the red, green and blue GRASS raster maps
> one-by-one and merge them with gdal_translate (or gdal_merge.py)?
If I want a RGB GeoTIFF, I rather export the group.
> 7. Exporting a group (the ones that automatically are created for each
> imported photo and contain the red, green and blue components
> respectively), gives "INTERLEAVE=PIXEL" but "Block=2500x3". Is it
> correct to force createopt="BLOCKYSIZE=1" which gives "Block=2500x1"? 
BLOCKXSIZE and BLOCKYSIZE affect the tile size, as far as I understand 
the gdal documentation. I would not change the defaults. Leaving 
BLOCKXSIZE on default = 256 and setting BLOCKYSIZE to 1 should produce 
tiles of size 256x1.
> 8. There are several compression methods? Does compression affect
> significantly reading/displaying an image?
I would stay away from tiff internal compression because other software 
might not support it (LZW and DEFLATE are sometimes not supported). If I 
want to distribute the tiff, I rather create an archive and send that.
> 9. Should one prefer another file format?
GeoTIFF is widely accepted, but if I want to provide a raster for a 
particular application, gdal might support the native raster format of 
that application and then this would be the preferred format.

TFW=YES would only be needed if you export a raster for an application 
that can not read GeoTIFF internal metadata. In this case I would rather 
use the native format of that application. Many spatial data viewer make 
use of gdal and should therefore read GeoTIFF properly.

Maybe there is a problem with your gdal installation? I would first 
check that simple single band export with default settings works before 
trying to fix the gdal installation.

I hope that helps,


More information about the grass-user mailing list