0

I am having issues with the "SetNull" function within the Raster Calculator in ArcMap. I have a landsat 8 image that I separated the bands into their own raster (only working with 6 of them), bands 2-7. I needed to separate the bands beucase each band has a different "NoData" value. I.e. Band 1 "NoData" = 10, Band 2 "NoData" = 5, so on and so forth. I was able to perform the following on all the bands except for band 2:

Raster Calculator SetNull("Band1" == 10, "Band1")

Band 2 would run, but the "NoData" pixels would stay at their same value (would not change). The only value that is changing is the stretch value. See images below. The red dot was painted on to show which pixel I am picking.

I've tried a couple different operations with band 2 such as trying to multiple by 0.5. the pixel value will change then, but setting it to Null does not work.

Any suggestions?

enter image description here

enter image description here

enter image description here

3
  • 1
    This raster doesn't look like integer type.
    – FelixIP
    Commented Jul 12, 2019 at 3:03
  • @FelixIP, yes this worked, but why do I have to convert only band 2 (band 3 from original landsat file)?
    – Binx
    Commented Jul 12, 2019 at 3:42
  • I guess something went wrong during band extraction.
    – FelixIP
    Commented Jul 12, 2019 at 4:12

1 Answer 1

1

This is probably due to some rounding of the value that is displayed, so your "nodata" value is not precisely equal to your value. There are two workarounds:

make a test with inequalities

SetNull(("Band2" > 0.023808) and ("Band2" < 0.023810), "Band2")

or (if applicable) use the NoData from another band

SetNull(("Band1" ==10), "Band2")

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.