I try to work with the minimum and maximum values of a raster layer in the raster calculator in QGIS 3.6. I try to do the following formular:

(  @RasterCellValue  -  @RasterMinValue  )  /  (  @RasterMaxValue  -  @RasterMinValue  )  * 65535

Is there a way to get the Min and Max Values from a raster layer into the formular?

When I use the GDAL Raster Calculator Tool and choose the option "Pre Calculated Value" instead of "Value" (marked yellow in the image below) the tool still calculates with the "Value" instead of "Pre Calculated Value" (see second image of the protocol).

GDAL Raster Calculator Input Form

Protocol of the Tool

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.