4

When I use focal statistics setting the neighborhood of each processing cell to be a circle with 800m radius (map units, not number of cells), how are the statistics calculated in the edges of my region, when in that radius there are ΝoData pixels? In my case, I have selected for each neighborhood to be defined by a circle with 800m radius around each processing pixel. What I get in the edges is something like a "buffer" around my region that equals to the circle radius. Is this normal? How is it explained? enter image description here

1
  • 1
    The edge effect problem is well know and unfortunately, there are no edge corrections applied in focal functions. Whatever values occur in the window are what the statistic represents (e.g., on actual edge pixels only half of the window would have values and the rest are treated as no data). Commented Feb 2, 2015 at 17:24

1 Answer 1

3

Since this is software specific, you should tag this as ArcGIS.

Software help is your friend. If you look at the usage of FocalStatistics you will see that there is an argument "ignore_nodata" that controls exactly what you are observing.

ignore_nodata - Denotes whether NoData values are ignored by the statistic calculation.

DATA — Specifies that if a NoData value exists within a neighborhood, the NoData value will be ignored. Only cells within the neighborhood that have data values will be used in determining the output value. This is the default.

NODATA —Specifies that if any cell in a neighborhood has a value of NoData, the output for the processing cell will be NoData. With this option, the presence of a NoData value implies that there is insufficient information to determine the statistic value for the neighborhood.

4
  • I have checked the argument "ignore no data" and the result was the image I pasted at the original post. Commented Feb 2, 2015 at 18:17
  • 1
    Yes, and if you uncheck it you should not have a 800m data dropout around the edge of your raster. When the edge pixels are treated as no data the resulting raster will also be no data. Commented Feb 2, 2015 at 18:46
  • 1
    +1 Your answer is more valuable when perceived as not being software specific: the facts that neighborhood stats have to deal with edge effects, and how they deal with those, are important for any raster-based GIS.
    – whuber
    Commented Feb 2, 2015 at 20:12
  • I would imagine that however ESRI has the focal function implement is either removing or adding values associated with NoData. One way to limit values outside of your rasters "edge" is to define a mask raster that explicitly defines the spatial domain of where values can be written. Commented Feb 10, 2015 at 21:26

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.