[gdal-dev] gdalwarp puts negative in front of target height

Frank Warmerdam warmerdam at pobox.com
Tue Dec 11 13:10:14 EST 2007


Matt Wilkie wrote:
> dear gdal,
> 
> I'm attempting to mosaic a large set of images together using gdalwarp,
> but when I use the target resolution (-tr) parameter I get the error
> below. However if I drop -tr and use target size (-ts) instead it works.
> 
> Works:
> 
>  gdalwarp ...snip... -te 88566.821279156 1594588.80496717
> 533067.710280934 1023087.66196489 -ts 21000 27000 ...snip...
> 
> Creating output file that is 21000P x 27000L.
> Processing input file N60-W138_ul.tif.
> 
> 
> Doesn't:
> 
>  gdalwarp ...snip... -te 88566.821279156 1594588.80496717
> 533067.710280934 1023087.66196489 -tr 21.166883334184629
> 21.166883334184629 ...snip...
> 
> Creating output file that is 21000P x -26999L.
> ERROR 1: Attempt to create 21000x-26999x3 TIFF file, but width, height
> and bands must be positive.

Matt,

The arguments to -te are supposed to be xmin ymin xmax ymax but you have
xmin ymax xmax ymin.  I believe this is responsible, though I'm a bit
surprised that it only affects one scenario and not the other.

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