[FWTools] gdal_merge with -ps optoin is giving the following error

Frank Warmerdam warmerdam at pobox.com
Mon Nov 19 19:19:44 EST 2007

mzorova wrote:
> ERROR 1: Attempt to create 1x0 dataset is illegal,sizes must be larger than
> zero
> .
> Creation failed, terminating gdal_merge.
> the command that causes this error:
> [Mon 11/19/2007 15:22:58.60] C:\temp>gdal_merge -v -ps 1480 600 -o
> merged.tif 1.tif 2.tif 3.tif 4.tif
> I did add two GCP points for each of the 1-4.tif files as well as specified
> the projection that they are in.. 
> Would anyone have an idea as to what I may be doing wrong here?


The -ps switch sets the size of a single pixel in the output file in the
coordinate system of the output.  I suspect your data is geographic
coordinates and you have requested a file where each pixel is 1480
degrees by 600 degrees which results in a size of less than 1 pixel by
1 pixel.

You either need to select a more appropriate output pixel size or remove
-ps completely and let gdal_merge.py pick an output size.

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 FWTools mailing list