[gdal-dev] Resampling.

Frank Warmerdam warmerdam at pobox.com
Tue Jun 16 09:43:35 EDT 2009


Belaid MOA wrote:
> Hi everyone,
>   I am new to GDAL and I need some help on how to do re-sampling 
> (programmatically).
> I have 30mx30m Geotiff images and I'd like to resample them into 25mx25m 
> Geotiff images.
> 
>  Any help on this is very appreciated.

Belaid,

One approach to do this would be a command like:

  gdalwarp -tr 25 25 input.tif output.tif

This resamples to 25x25 meter pixels with the default (nearest neighbour)
resampling kernel.  You might also want to use a fancier resampling kernel,
such as cubic convolution:

  gdalwarp -r cubic -tr 25 25 input.tif output.tif

More details are available at:

   http://www.gdal.org/gdalwarp.html

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    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list