1

enter image description here

I use Arcgis desktop 10.4.1. I also both have 3D and Spatial Analyst.

I want to change the pixel values inside the blue polygon in the picture above. It's a river, but for some reason the pixel values inside the red circle is higher than the rest. I want to change all pixel values inside the blue polygon to 120.12, but I can't find any workflow to do this.

Any ideas?

3

I would tackle this by ...
1. Converting the blue polygon to a raster (polygon to raster tool) setting the raster value to 120.12 (lets call the output GRID "blue" and the original raster "original"). You can actually just set it to 1 and have the rest be 0. If it is NoData outside the polygon you can still work with it but it is easier if it is all ones and zeros (or 120.12 and 0).

  1. Using the Con tool and set the condition to be something like ... Con(blue = 120.12, blue, original) if you are using the raster set to 120.12 or

Con(blue == 1, 120.12, original) if blue is 1/0.

Once you have this done you can just use the output instead of the original for your analysis. Best to use the original as a "snapping" raster in our Environments settings.

Note: if you have NoData in your "blue" layer you would need to use something like IsNull in the Con expression in order to deal with that (easier to not have the NoData).

Con(IsNull(blue), original, 120.12) would probably work as long as you only have NoData and a single value.

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.