[gdal-dev] problems with gdal_merge.py
Volker Wichmann
Volker.Wichmann at uibk.ac.at
Wed Apr 23 14:59:11 EDT 2008
Frank Warmerdam wrote:
> Volker,
>
> You will need to file a ticket on this, and provide as much supporting
> information (ie. .HDR files) as you can.
>
> I'm pretty sure we have already gone through several iterations on this
> so there is clearly something that isn't being properly understood. I'm
> not going to take your fix on faith, I need to know I'm actually fixing
> things, not just stirring the pot again.
>
Frank,
I will do so, and started to build up a test case. But first of all I
may need some advice, I'm a little surprised by my first tests.
I build a simple 4 by 4 grid, geotiff format. Running gdalinfo on the
file I get:
gdalinfo 4by4.tif
Driver: GTiff/GeoTIFF
Files: 4by4.tif
Size is 4, 4
Coordinate System is `'
Origin = (10.500000000000000,13.500000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 10.5000000, 13.5000000)
Lower Left ( 10.5000000, 9.5000000)
Upper Right ( 14.5000000, 13.5000000)
Lower Right ( 14.5000000, 9.5000000)
Center ( 12.5000000, 11.5000000)
Band 1 Block=4x4 Type=Byte, ColorInterp=Gray
The Origin / Upper Left matches with what I expected (the grid BOUNDARY
is: N 14 S 10 W 10 E 14). I'm not sure to understand the values
reported for the Lower Right - isn't this off by 1 cell in x and -1 cell
in y??
I don't think it makes sense to go on before I get this ...
>> Other issues I'd like to see mentioned on the gdal_merge.py page
>> (http://www.gdal.org/gdal_merge.html):
>> - if the output file is already existing, the behaviour of the module
>> is indetermined as it tries to append to the file (?)
>
> I don't know why you say this. If the output already exists, then the
> script attempts to mosaic into it.
>
ok, I see it's a feature. But I think it should be mentioned in the docs
>> - the -ul_lr arguments reference the cell CENTERS
>
> The -ul_lr arguments are (to the best of my knowledge) outer pixel edges,
> not cell centers.
not for me, but as written above: first of all I need to get that right
to build a proper test case.
your help is really appreciated,
Volker
More information about the gdal-dev
mailing list