[Gdal-dev] Newbie doubt: gdalwarp

Mateusz Loskot mateusz at loskot.net
Fri Oct 19 10:02:05 EDT 2007


om wrote:
> Mateusz Loskot wrote:
> 
>> om wrote:
>>  
>>
>>> Hi,
>>>
>>> How can I scale a GeoTIFF image ? I have tried gdalwarp -tr 8000 8000
>>> -ts 8000 8000 inputimage.tif out.tif (input image resolution is
>>> 5213x5613) and got the following error.
>>>
>>> Creating output file that is 0P x 0L. ERROR 1: Attempt to create
>>> 0x0x1 TIFF file, but width, height and bands must be positive.
>>>
>>> -Is it possible to scale the image using gdalwarp? or is there any
>>> other way I can accomplish this...
>>>   
>>
>> -tr option is related to resolution in terms of image geo-reference.
>> If you want to scale in terms of changing physical size of image, you
>> can use gdal_translate with -outsize option
>> (http://gdal.org/gdal_translate.html) but -outsize does not preserve
>> geo-reference of the image precisely. The upper left corner will stay in
>> the right place but other 3 corners will get moved, as the image is
>> smaller or bigger after applying -outsize.
>>
>> Cheers
>>  
>>
> 
> I'm getting the same error if I use -tr option only also  :-( .
> Am I doing anything wrong  in the commandline option?

Could you give the output of gdalinfo for your raster?
Perhaps it's not georeferenced.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list