# ArcGIS: NDVI average for bare soil

In ArcGIS I have a 3 Landsat NDVI datasets for 3 consecutive months and would like to calculate the mean bare soil (in hectares) for which I have manually worked out to be between the values of 105 and 126 for my AOI.

I have tried using the raster calculator, however when I go back to validate the results for say value 105, the count values across the 3 datasets are 5,40 and 35 respectively, shouldn't the mean count be 26.6 (5+40+35/3)? However in the output dataset, I get a count value of 2.

What are I doing wrong or maybe I have missed a step in ArcGIS? I suggest to use Cell Statistics for your case using the following formula:

``````CellStatistics (in_rasters_or_constants, {statistics_type}, {ignore_nodata})
``````

If you want to calculate the average, you can use the following:

``````OutRas = CellStatistics([InRas1, InRas2, InRas3], "Mean", "NODATA")
``````

In ArcToolbox, it is available under `ArcToolbox → Spatial Analyst Tools → Local → Cell Statistics`

• Thanks for your quick response ahmadhanb. My problem with going that way is I don't have access to the attribute table to calculate the area of bare soil? Jul 4, 2018 at 1:55
• You can build an attribute table resources.arcgis.com/en/help/main/10.2/index.html#//… which will give you the area (count of cells * area for each cell) of each unique value, the problem is that it only works for integer rasters so you will need to reclassify or int your OutRas before building statistics. Jul 4, 2018 at 2:00
• In addtion to what Michael Stimson said, if you want to do calculatation for a specific region, you may need to draw a polygon and use Clip tool: desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/… to clip the raster for only that region and then use Cell Statistics. Jul 4, 2018 at 2:06
• I have already clipped to each dataset to the AOI. Jul 4, 2018 at 2:07
• Then I think there is no problem to use Cell Statistics, because it is a statistics per cell across the raster data (the NDVI raster data). You can refer to the help in the answer. Jul 4, 2018 at 2:09

Looks like the "Extract by Attributes" in Spatial Analyst gets me the values of NDVI 105-124 with the correct count in a new dataset. However, once again, the Raster Calculator or Cell Statistics are failing to correctly give me the Mean or Sum values.

I have also done the calculations in Excel and obtaining different Sum and Mean values to ArcMap. 