2

In some vides appear a process separated and I would like to do this two steps in one step:

  1. set all values greater or equal to a number to 0:

    Con("MyRaster" >= 2800, 0 , 1)

the result is called "BandCloud.tif"

enter image description here

  1. use created mask of 0 and 1 is to give 0 value to clouds and keep the rest of the data in "MyRater":

    floar("MyRaster" * "BandClud")

the results is a ratser where are cloud values are equal to 0 and the rest is the data "MyRaster"

So, finally I get a raster of my data ("MyRaster") and 0 for clouds

enter image description here

But would liker to directly in the same first conditional (1) to set could values not to 0 but directly to null, I did it in a third step:

  1. set 0 values to null:

    SetNull("MyRaster" == 0, "MyRater")

enter image description here

How could this be done with raster calculator in ArcGIS?

1
  • Not sure I understand exactly what you want. If I misunderstand please clarify your question. You should be able to nest you raster calculator commands. If you wan't the zeros from the first command to be nulls instead: Con("MyRaster" >= 2800, SetNull("MyRaster" >= 2800, "MyRaster"), 1) – Greforb Feb 4 '20 at 7:29
3

If you want to set pixels to null when "MyRaster" >= 2800 and set everything else to the values of "MyRaster" all in one step, use this expression:

Con("MyRaster" < 2800, "MyRaster")

or this expression:

SetNull("MyRaster" >= 2800, "MyRaster")

Your Answer

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

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