[GRASS-dev] TIFF output size: r.out.gdal vs gdal_translate

Maciej Sieczka tutey at o2.pl
Wed Aug 20 06:06:05 EDT 2008


Hi

I've noticed that r.out.gdal creates GeoTIFFs significantly larger than
gdal_translate. Could this be avoided?



Example, in spearfish60:

$ r.out.gdal in=landcover.30m out=landcover.30m.tif type=Byte
$ ls -l landcover.30m.tif
-rw-r--r-- 1 shoofi shoofi 303978 sie 20 11:49 landcover.30m.tif

$ gdal_translate landcover.30m.tif landcover.30m_gt.tif
$ ls -l landcover.30m_gt.tif
-rw-r--r-- 1 shoofi shoofi 300220 sie 20 11:49 landcover.30m_gt.tif



Applying compression makes the difference more distinct:

$ r.out.gdal in=landcover.30m out=landcover.30m.tif type=Byte 
createopt="COMPRESS=DEFLATE"
$ ls -l landcover.30m.tif
-rw-r--r-- 1 shoofi shoofi 51338 sie 20 11:50 landcover.30m.tif

$ gdal_translate -co "COMPRESS=DEFLATE" landcover.30m.tif 
landcover.30m_gt.tif
$ ls -l landcover.30m_gt.tif
-rw-r--r-- 1 shoofi shoofi 47567 sie 20 11:51 landcover.30m_gt.tif



(Probably related to [1]. Some more info in a duplicate [2].)

[1]http://trac.osgeo.org/gdal/ticket/1688
[2]http://trac.osgeo.org/gdal/ticket/1689).

Maciek

-- 
Maciej Sieczka
www.sieczka.org


More information about the grass-dev mailing list