[GRASS-user] Export of GeoTIFF
Maciej Sieczka
tutey at o2.pl
Wed Oct 10 03:51:57 EDT 2007
christian.braun at tudor.lu wrote:
> I have serious problems exporting GRASS DCELL rasters to GeoTIFF.
> I used r.out.gdal with type=Float32 and set the compression to LZW.
> What I got later on in ArcView 3.3 is pure noise fort he picture and in
> ArcGIS 9.2 I get some strange results.
> The NULL values of the picture get a cryptic code like -1#QUAN1 and if
> there are pixels with value 0 they become NoData in ArcGIS.
Christian,
Do the GeoTIFFs look OK in other software e.g. QGIS or OpenEV?
What GRASS version? r.out.gdal in GRASS < 6.3 is a shell
script (wrapper around gdal_translate) and works well
AFAICT. It's also present in GRASS 6.3 as r.out.gdal.sh.
But, the r.out.gdal in 6.3 is a new module written in C, and
it has a bug about null data handling [1]. I'm not sure,
but maybe it's related.
Please try the shell script r.out.gdal version and let us
know if it works.
If neither does please provide a sample dataset and a
procedure to reproduce the error.
> I need to have them as GeoTIFFs for the easy im- and export. I am aware
> that I can also use r.out.ascii but then I have to do an import procedure
> in ArcGIS. For nearly 1000 images that is a bit hard to do.
As a workaround you can export with r.out.ascii and
batch-convert them into GeoTIFF with gdal_translate, eg.
given that your ascii rasters have "asc" extension:
for i in *.asc; do gdal_translate (your options go here) $i
$i.tif; done
[1]http://wald.intevation.org/tracker/?func=detail&aid=405&group_id=21&atid=204
Maciek
More information about the grass-user
mailing list