I am working on raster data that which is in a 5x5 meter resolution. I need to resample this to a 25x25 meter resolution. I have used resample.stats which works, but changes the label numbers into one with decimals.

enter image description here

Is there a way of resampling the raster into a 25x25 meter resolution without changing the labels? As I need these to be integers to work with the data after reprojection. The attached picture displays before and after of the data.

  • 1
    "Reproject" is the wrong term -- "Resample" is correct. By default, resampling 25 cells into one will result in an average of the pixel values. You need to Edit the Question to contain the exact command you used in order for someone to tell you what you did wrong.
    – Vince
    Sep 5 at 12:57
  • @user2856 that did the trick indeed, thanks for the help!
    – Hartje
    Sep 5 at 13:50

1 Answer 1


Change the resampling method from the default average to something that doesn't return a floating point value like min, max or mode.

Your Answer

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

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