[gdal-dev] problems with gdal_merge.py
Volker Wichmann
Volker.Wichmann at uibk.ac.at
Tue Apr 22 10:10:32 EDT 2008
Hi,
I'm checking gdal_merge.py for generating subsets and mosaics from one
or more input rasters. I found the following problem using esri ascii
grids as input:
gdal_merge.py -o clip.tif -ul_lr 672898.75 5125166.25 674323.75
5123911.25 -v dtm_utm01111.ascii
Filename: dtm_utm01111.ascii
File Size: 1281x1121x1
Pixel Size: 2.500000 x -2.500000
UL:(672198.750000,5125601.250000) LR:(675401.250000,5122798.750000)
Copy 280,174,571,503 to 0,0,570,502.
using the same file in geotiff format I get:
Filename: utm01111.tif
File Size: 1281x1121x1
Pixel Size: 2.500000 x -2.500000
UL:(672200.000000,5125600.000000) LR:(675402.500000,5122797.500000)
Copy 280,174,570,502 to 0,0,570,502.
In case of the ascii, the file is resampled (and thus the values in the
output subset differ from the original). This doesn't happen with a
geotiff as input (see the "Copy" lines above).
It's also strange, that in both cases the reported UL and LR don't match
the input coordinates and the extent of the output files (the latter
match the coordinates passed with -ul_lr).
I'm still using GDAL 1.4.2.0 but haven't found any major changes in trac
regarding gdal_merge.py. It would be nice if somebody could try to
reproduce this with GDAL 1.5 to see if any of the underlying functions
have changed.
Thanks,
Volker
More information about the gdal-dev
mailing list