[GRASS-user] GRASS export GeoTiff adventure... continued :-)
nikos.alexandris at felis.uni-freiburg.de
Sun Aug 3 10:29:25 EDT 2008
how do you really export as GeoTiffs your raster maps to view in OpenEV,
I think I solved my problem by removing color tables (as Markus Metz
suggested), exported groups, nodata=-9999 and, very important, setting
in my loop over all groups a "g.region rast=$i" each time.
Without it I couldn't see anything whenever I have put an out of range
nodata value. I am posting my questions I had before "solving" my
problem anyway. Maybe there is still something interesting to
Thank you, Nikos.
Linux vertical 2.6.24-19-generic #1 SMP Fri Jul 11 21:01:46 UTC 2008
GDAL 1.5.2, released 2008/05/29
GRASS 6.4.svn (2008)
For the records: I am not interested to open my images with any other
tool than TheGIMP, QGIS, OpenEV (maybe ImageMagick).
I export the groups (red, green and blue maps for each group) with:
for i in `g.mlist group`; do r.out.gdal $i type=Byte out=$i.tiff; done"
I can see the exported images in QGIS, OpenEV. However, this sets 255 as
"nodata" which is something that I don't want. Whenever I set a nodata
value out of range  (for Byte that would be smaller than 0 or bigger
than 255 --- right?) I can't see propely the exported tiffs in either
QGIS or OpenEV. In QGIS nothing appears and in OpenEV the individual
tiff's (loading with openev -h *.tiff) "flash" and dissapear to leave a
Is there a way to use r.out.tiff to export groups?
Frank Warmerdam wrote  "There is no standard tag in TIFF or GeoTIFF
for describing nodata pixel
values. The only approach you might be able to use is to somehow add
alpha channel and mark the nodata regions as alpha=0; however, I'm not
sure how you would go about that."
Is this related to the "nodata" problem?
If yes, has anybody found a solution to it?
Could the "metaopt=" option of r.out.gdal be useful here?
I can't seem to export raster maps with gdal_translate as described in
Markus' blog 
(copy-paste from  gdal_translate -of
What about this work-around  that Maciek postd some time ago?
More information about the grass-user