1

I have a raster file with two categories: category 12 (total count=350) and category 14 (total county = 500). The attribute table looks like this:

rowid Value Count
 0     12     350
 1     14     500  

Is there any way I can give all pixel a value of 1?

3 Answers 3

2

Have a look at the Reclassify tool (Spatial Analyst).

1

You can use a conditional statement in the raster calculator as follows:

Con("your_raster.tif" >= 12, 1, "your_raster.tif")

This command assigns any value greater than or equal to 12 a value of 1.

1

Rather than playing with conditional statements (which are fine, but not necessary here), I would just do the following in raster calculator:

("raster.tif" * 0) + 1 

Simple and effective.

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.