[gdal-dev] Re: Strange things with gdalwarp ...

Hermann Peifer peifer at gmx.eu
Sat Aug 15 06:57:37 EDT 2009


Felix Schalck wrote:
> Hello,
> 
> As explained in my previous question, I'm trying to create a high
> resolution topographic map of europe based on cgiar processed srtm
> data. Of cours, the first step is to merge the 5*5° tif tiles into one
> big tif, which can be achieved using gdalwarp's mosaic feature.
> 
> Simply pasting all the tiles togther trough following code:
> 
> gdalwarp --config GDAL_CACHEMAX 512 -wm 512  HDA1/srtm_*.ti HDA2/final.tif
> 
> takes about 20 hours. HDA1/2 are two different harddrives.
> 
> Now, a second script, pasting first "slices" of 5*30° together, and
> than merging all the slices:
> 
> for i in 39 40 41 42 43; do
> gdalwarp --config GDAL_CACHEMAX 512 -wm 512 HDA1/srtm_$i*.tif
> HDA2/slice_0$((i-34)).tif
> done
> gdalwarp --config GDAL_CACHEMAX 512 -wm 512 HDA2/slice_*.tif HDA1/final.tif
> 
> takes less than on hour ! Filesize is similar.
> 
> So what is the trick here ? Is there some quality loss when using gdalwarp ?
> 
> Felix Schalck


I have the same observation while working with ASTER GDEM tiles (1x1 degree tiles, 3601x3601 pixel each). When warping/merging, say: 10 tiles into a single outfile.tif, then it takes gdalwarp around 5 seconds per tile to do the job:

gdalwarp  --config GDAL_CACHEMAX 500 -wm 500    \
          -rb -srcnodata -9999 -dstnodata -9999 \
          -t_srs etrs89_laea_52_10.wkt          \
          -tr 100 100                           \
          ASTGTM_N51*.tif outfile.tif

When trying to do the same with some 200-300 input files, then it takes several minutes to process 1 tile. My area of interest translates roughly into 1500 ASTER GDEM tiles... :-(

Hermann


More information about the gdal-dev mailing list