I just realized that I have Geo-TIFF's in the same coordinate system but different spatial resolution. DOP20 (20cm=1px) and DOP10 (10cm=1px) mix. Now wanted to use gdalwarp to transform the DOP20 TIFF into DOP 10. The commandline should be simple

gdalwarp.exe -tr 20000 20000 -r bilinear in.tiff out.tiff

but gdalwarp complains:

Creating outputfile that is 0Px0L Error 1 Attempt to create 0x0 dataset...

I thought it is a simple graphics operation, "blowing" a 10000x10000 pixel TIFF into a 20000x20000 pixel TIFF.

Can anybody help me understand what's wrong here?

  • 1
    -tr stands for target resolution. You do not want pixels of 20 km by 20 km.
    – user30184
    Commented Oct 7, 2015 at 15:41
  • I take this parameter from another answer, next time I will read the doc's :-(
    – Freudi
    Commented Oct 8, 2015 at 7:24

2 Answers 2


You don't say what your coordinate system is, but if it's in meters, your -tr arguments should be -tr 0.1 0.1. -tr sets the resolution (m), not the image size (cols/rows.)

Just guessing but GDAL is probably complaining because you're trying to create an image that occupies less than 1 cell.

  • gdaltranslate also change the ModelPixelScaleTag, great!
    – Freudi
    Commented Oct 8, 2015 at 7:31

If your source dataset has a size of 10000x10000 Pixels, the command line should be

gdalwarp.exe -ts 20000 20000 -r bilinear in.tiff out.tiff 


gdal_translate -outsize 20000 20000 -r bilinear in.tiff out.tiff 
  • I changed -tr to -ts , that works great . Thanks a lot !
    – Freudi
    Commented Oct 8, 2015 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.