I need to down-sample a map to new map with less resolution NOT for overview BUT to new map file with smaller size

I need to do that with gdal Utils


you can use gdalwarp for that, with the -tr parameter to set the output pixel size. For example, with input cell size of 10 m resampled to 50 m (so 25 times smaller in number of pixels)

gdalwarp -tr 50 50  -r average raw_image.tif resampled_image.tif

note that you can also use gdal_translate, but then with less control on the resampling method but the advantage of being able to use more option on the output image (such as compression)

gdal_translate -co COMPRESS=LZW -outsize 20% 20% raw_image.tif resampled_image.tif

UPDATE: with the release of gdal v 2.0, additionnal resampling method became available with gdal_translate. You can thus also use the -r average option

-r {nearest (default),bilinear,cubic,cubicspline,lanczos,average,mode}: (GDAL >= 2.0) Select a resampling algorithm.

  • can you give me an example? – Eli Alali Jan 28 '15 at 16:12
  • how can I control the average window? – Eli Alali Feb 4 '15 at 15:32
  • it will be the average of the pixel with their center in the new pixel. – radouxju Feb 5 '15 at 6:31
  • Creation options can be specified with both gdal_translate and gdalwarp. SO either way you can specify compression settings. – Pete Jun 8 '17 at 21:07
  • you have the same creation options, but not the same resampling options – radouxju Jun 9 '17 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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