[Gdal-dev] Newbie doubt: gdalwarp
Mateusz Loskot
mateusz at loskot.net
Fri Oct 19 08:44:34 EDT 2007
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
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list