I need help for a QGIS calculation. I have a raster made up of 20 classes and I need to get the area of each one. Now, performing only this task is easy but I must also exclude from the area calculation all the class patches less than 1 ha (namely 11.2 contiguous pixels considering the raster resolution. How can I do that through raster calculator or any other QGIS tools?

  • Depending on the size and resolution of your raster, you could vectorise it, filter by area and then dissolve by your classes to get the total areas. Or, you can sieve your raster to remove the small clumps of pixels. See this question and answers for reference
    – Matt
    Jan 24 at 12:00
  • Thanks, I've already tried with sieve but it assigns to pixel below the threshold to another class different from the origin.
    – Paolo
    Jan 24 at 13:00
  • Please add things you have already tried to your question. It will help improve the question and probably yield better answers.
    – Matt
    Jan 24 at 13:07


Your Answer

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

Browse other questions tagged or ask your own question.