-1

I want to use "raster calculator" within graphical modeler (QGIS). My input rasters are sentinel 2 bands, let's call them "A" and "B". The expression I want to calculate is (A-B)/(A+B). My problem is that the resulting output is not correct. In particular, DN of the resulting raster output should range between -1 and +1, while in my case I can't get to that result. Instead, when I use raster calculator alone (not within graphical modeler), it works right. Could someone explain how to properly use the "raster calculator" in a model?

put on hold as off-topic by Jochen Schwarze, Erik, whyzar, csk, Dan C 22 hours ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – Jochen Schwarze, Erik, whyzar
If this question can be reworded to fit the rules in the help center, please edit the question.

  • is it clear now? thank you for your interest – agrullo Feb 8 at 11:02
  • which qggis version? – Gabriel De Luca Feb 8 at 11:24
  • 3.2.3. Thank you for your help – agrullo Feb 8 at 11:26
  • Check if this Q-A can help you: gis.stackexchange.com/questions/309088/… – Gabriel De Luca Feb 8 at 11:31
  • 2
    If you want help troubleshooting your graphical model, you'll need to share enough information to reproduce the issue. I often find that a tool which I know how to use outside the modeler, gives unexpected results when I try to use it inside the modeler. Troubleshooting a model is very time consuming, and it usually turns out to be an issue with the input. – csk Feb 8 at 17:56