[gdal-dev] GRASS export GeoTiff adventure :-)
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Sat Aug 2 08:37:52 EDT 2008
Many questions... Thank you in advance, Nikos :-)
Importing RGB tiff's (size: 2500, 2500 --- with INTERLEAVE=PIXEL) in
GRASS' database splits them, as expected, in red, green and blue raster
maps. After MASKing out unwanted areas, how should one export the maps
to end-up with tiff files similar (or improved) to the original ones?
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
2. r.out.tiff does not provide a "nodata" option. What's the necessity
of r.out.tiff if r.out.gdal can do the same with more options?
3. GeoTiff metadata are lost always (?) while exporting with
r.out.gdal.
4. The createopt="INTERLEAVE=PIXEL" is not respected by r.out.gdal (?)
e.g.
r.out.gdal in=koblenz_2618_5566.red_i type=Byte
out=/home/nik/grassdb/rlp_fgaps/data/orthophotos/koblenz/test/koblenz_2618_5566.red_i2 createopt="INTERLEAVE=PIXEL,TFW=YES"
gdalinfo koblenz_2618_5566.red_i2
[...]
INTERLEAVE=BAND
[...]
5. What is the correct way to import an rgb photo, process, export back
in GeoTiff?
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)?
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"?
8. I read in Markus' blog [1] how to "write out a GRASS raster map to
GeoTIFF -- this format
includes the coordinates within the file's metadata" using
gdal_translate.
Doesn't r.out.gdal do that and if not why?
There is also that tiles provide "Fast image display...". From my small
experience, I can't really judge if TILES accelerate image display.
Sometimes I have the impression that they are slower that STRIPPED
tiffs.
8. There are several compression methods? Does compression affect
significantly reading/displaying an image?
9. Should one prefer another file format?
[1]
http://gfoss.blogspot.com/2008/06/gdal-raster-data-tips-and-tricks.html
More information about the gdal-dev
mailing list