1

I have obtained a flow accumulation map using Arc Hydro tools and obtained the default value in the range of 0-204567. Now I need to change these value by default so that it gives 1 instead of zero. I have tried to reclassify it but I am not getting the range 1- 204567. So for this I have to use a con operation in raster calculator but I don't know what condition to use so that I get a value of 1-204567. How do I specifiy the correct con statement in order to change the value?

  • Please include an example of the command that came closest to achieving your goal. This would make it easier for the volunteers here to help you fix your code in the most understandable form. You may need to roll back in the analysis process, since, like changing all the 'a's to 'e's in word-processing software, changing all the zeros to ones might not produce valid results. – Vince May 2 '16 at 11:15
1

If I understand you correctly, by default value, you mean that currently, 0 would represent something like NoData value. In ArcMap, you can change the NoData value of a raster in two ways.

  1. Add raster as a layer, right-click that layer, select Data -> Export. Make your settings, and under NoData value, change the value to your desired value.
  2. As pointed out here, you can use a Raster Calculator expression to do this.

Con(IsNull("inputraster"),1,"inputraster")

This expression assigns a value of 1 if the cell is NoData, otherwise, it retains the original value.

As Vince pointed out, this could cause issues if you have valid values of 1 in your raster. You could explain your situation better to get a better answer on how to proceed.

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.