1

I understand the examples on the official QGIS page showing bracketed expressions result in 0 or 1 and those integers can be scaled or values added, but I clearly do not understand how to use the MIN and MAX values and every attempt crashes.

I want to "clip" grid values by setting grid values < 1% of the value to that 1% value. I also want to do the same with those above 99%.

I try

(grid < (MAX (grid) - MIN(grid) /100) ) * (MAX (grid) - MIN(grid) / 100)

but this crashes QGIS.

Is this possible? If other commands change every cell, what are MIN and MAX actually doing?

QGIS Raster Calculator page: https://docs.qgis.org/2.8/en/docs/user_manual/working_with_raster/raster_calculator.html

4
  • 3
    Could you add a link to the documentation that you are referring to? Are you sure that you are not deviding by zero?
    – user30184
    Jun 8, 2020 at 9:04
  • Added link to QGIS page
    – user24007
    Jun 8, 2020 at 10:05
  • On that page I can see Min and Max only in MinX/MaxX, MinY, MaxY which mean the min/max easting-northing coordinates of the image. Is your link correct?
    – user30184
    Jun 8, 2020 at 16:08
  • OK, got the latest QGIS Raster Calculator link now. As an aside, I am looking at ArcGIS at work and there is no Min or Max in it's Raster Calculator to compare with.
    – user24007
    Jun 9, 2020 at 4:26

0

Your Answer

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

Browse other questions tagged or ask your own question.