[Gdal-dev] gdal_translate speed of dted2
Frank Warmerdam
warmerdam at pobox.com
Thu Apr 19 19:30:43 EDT 2007
Jared Rubin wrote:
> Hi,
> I am experiencing very slow translation of dted2 files to other file formats
> using the gdal_translate utility. dted2 files are only 3601 columns x 3601
> rows. So I am wondering how the conversion can be this slow. Is there a more
> direct way I can use the gdal library?
Jared,
DTED files are column oriented instead of row oriented. But applications
like gdal_translate read one horizontal scanline at a time. This isn't
normally a problem unless the working cache is too small to hold all
the column blocks in which case every time you read one scanline, all
the column have to be reread from disk.
The solution is increase the cache size.
This can be accomplished by setting the GDAL_CACHEMAX environment
variable to a value large enough to hold all your data. For a 3601x3601
DTED setting it 30 (ie. 30MB) should be fine. This can also be done
on the commandline.
gdal_translate --config GDAL_CACHEMAX 30 in.dt2 out.tif
This problem is *often* seen with dted 2 files, but can affect other
formats where a substantial cache is needed to avoid cache thrashing.
The default cache size has been increased to 40MB in the development
version, so we should stop seeing this question in regard to dted2 in
the future.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list