2

I have a land use raster file and am trying to use the raster calculator to query the file for surface water.

The saga formula (11 = surface water band):

(a, 11)

This does not work.

Can anyone help me with the raster calc syntax to perform this?

1

1 Answer 1

2

Try eq(a, 11)

With an example of 6x6 dummy raster (values 1-6 and NoData=0): giving eq(a, 3)

enter image description here

It will return a new raster which 3 has become 1, and others are 0 (thus transparent NoData).

In case you want to extract the cell value 11 itself, try a*eq(a, 11) instead (the righthand side image).

enter image description here

2
  • Thanks for the answer and for the explanation! Commented Jun 7, 2019 at 5:23
  • @AndrewRickard kindly accept the answer if your problem is solved.
    – Padmanabha
    Commented Sep 17, 2023 at 19:04

Your Answer

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

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