I have a bathymetry raster, and I am trying to use it to calculate a parameter called the "contour index". This parameter is calculated using the max and min values from a moving window of cells (let's say, 9x9). It's defined as "(max depth - min depth)/max depth * 100". Once calculated, the values should range from 0-100.

To try to calculate the contour index, I first used ArcMap-->Spatial Analyst-->Neighbourhood-->Focal Statistics to create a new layer for the min water depth and max water depth in each 9x9 window. I then tried to use the "raster calculator" to calculate the contour index value for each cell.

However, the resulting layer is definitely wrong, with values ranging from -70,000 - 180,000. I honestly am at a loss for what I am doing wrong. Could it be related to NA values in my raster (eg. coastlines and edges of the raster)?

  • gis.stackexchange.com/questions/157766/…
    – FelixIP
    Commented Feb 4, 2017 at 1:11
  • It looks like you made an error in your calculations. (Those numbers could be close to the max depth multiplied by 100, for instance.) Could you show us specifically what calculations your performed and what the results were at each step?
    – whuber
    Commented Feb 5, 2017 at 22:21

1 Answer 1


Focal statistics by default ignore NoData thus it shouldn't affect your results

if a NoData value exists within a neighborhood, the NoData value will be ignore

Maybe you make some mistake in Raster calculator.

Try focal statistics with range option. It gives you raster with max-min within (9x9) window. Then use the same tool with max option. Finally use raster calculator with expression like (range/max) * 100

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.