I want to set null to the value<=0 using the raster calculator in ArcMap, but after that, I got a new raster with a changed maximum value. Is there any problem with my setting? How to keep the other value (e.g. maximum value) the same but set null to value<=0? please see the attached screenshot.
-
Con(raster >0, raster)– FelixIPCommented Jan 7, 2021 at 5:19
-
3Statistics of original may have been approximate. You can run calculate statistics tool on original to check.– user2856Commented Jan 7, 2021 at 5:29
-
@user2856 Sorry, I may not understand what you mentioned. Could you describe it in more detail? Thank you so much. Actually, I mosaic two MODIS images into one and covert the original format(.hdf) to the new one (.tiff). And then I used the new one to do the raster calculator.– Yiqian ZengCommented Jan 8, 2021 at 3:42
-
@FelixIP the result of Con(raster >0, raster) is the same as that of SetNull(raster <=0, raster)– Yiqian ZengCommented Jan 8, 2021 at 3:42
-
@user2856 what is the difference between the calculate statistics tool and ArcToolbox?– Yiqian ZengCommented Jan 11, 2021 at 2:15
|
Show 2 more comments
1 Answer
You should run the Calculate Statistics tool on your original raster.
This is to ensure that the raster statistics (min, max, stdev etc) are correct, not approximate. You should never rely on the min/max values displayed in the layer legend in the table of contents, they can be approximate (derived from a sample).