1

I have two rasters: the first is a basin with all pixels values equal to 0. The second raster (mask) has a single pixel with value = 1. In fact, I need only one raster where all the pixels into the basin must be = 0 and this specific pixel (in the mask) must have the value 1.

How can I do this process using ArcGIS Desktop?

I tried to use raster calculator with the sum "Raster 1 + Raster 2", but it did not work because the result is all the pixels into the basin equal to 1.

  • I provided a quick answer, assuming that the mask covers all null values in the basin raster, but does your mask layer need to exclude additional areas in the basin? I can update to reflect that. – SaultDon Mar 11 at 19:09
  • Many thanks, SaultDon. The mask doesn't cover all the pixels in the basin raster. The mask is just a isolated pixel and I'm tryng to use this pixel to change the value in the corresponding pixel at the basin raster. – Diêgo Araújo Mar 11 at 19:17
  • Solved. Thank you. I used Cell Statistics instead Raster Calculator and checked the box "ignore no data". :) – Diêgo Araújo Mar 11 at 19:33
  • You can post that as an answer to and mark as correct. Helps anyone else with the same problem find it easier. – SaultDon Mar 11 at 19:43
1

Solved!

What I did:

I used Cell Statistics (instead Raster Calculator). The tool allow you to do the sum (or any other operation) ignoring 'No data' values in the mask raster, so the others pixels in the main raster are not affected.

1

Con(IsNull("basin"),"mask","basin")

After re-reading your question more carefully looks like the above does exactly that.

What it does is use the Con() function with an embedded IsNull() function.

The format looks like: Con(look for this value, if found make it this, else this)

So in your case look at the Null Values in basin, where they exist - fill em in with mask, else if they aren't null in basin leave them as basin.

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.