Full question: What is the most appropriate way to assess the impact of spatial scale on derivative calculations associated with typical 3x3 moving window kernel operations?
This relates to a couple of existing questions:
- Finding local maxima with variable window search using ArcGIS Desktop? and
- Using variable window ("kernel") size for raster processing in QGIS?
but the problem is not the same.
The issue presented here relates to how to best account for spatial variability whilst treating element positions within a kernel consistently whilst also minimising potential uncertainty inherent of some possible processing steps.
For many terrain analysis algorithms, a moving 3x3 kernel is often implemented of the form:
[i-1, j-1] [i,j-1] [i+1,j-1] [i-1,j] [i,j] [i+1,j] [i-1,j+1] [i,,j+1] [i+1,,j+1]
This works for many implementations such as slope calculations where each pixel is equally weighted. The jump I'm not able to make is what happens where we are interested in implementing a function over a larger area e.g. to account for spatial dependence of the result?
As far as I can see, there are two ways of addressing such a problem:
- Increase the kernel pixel dimensions whilst leaving the underlying raster at its original cell resolution
- Keeping the kernel pixel dimensions the same but resampling the raster so that the kernel is by default covering a larger area
Option 1 - increase kernel dimension
Where all values within the kernel are operated on equally e.g. a mean is taken, then the kernel can simply be expanded so 3x3 >> 5x5 >> 7x7 etc. However where specific locations have specific importance e.g. when calculation Horn's (1981) finite difference estimator (east-west gradient):
(Horn's (1981) finite difference estimator taken from Burrough and McDonnell, (1998))
bigger kernels can introduce hurdles.... For example, it would be easy to over-weight values in the corners of the kernel as opposed to the horizontal/perpendicular locations. Thus, how you specifically weight pixels is something to consider.
Option 2 - resample raster using fixed kernel pixel dimension
Resampling the raster will force the window to cover a larger area (a pixel is still a pixel after all) however by resampling our underlying raster we:
- introduce uncertainty associated with the chosen resampling technique
- Lose some of the higher frequency components (perhaps desirable....)
- Remove the ability to cleanly assign any derived values from the moving window to a raster of the same dimensions of the original
Methods do exist considering multi-scale changes e.g. Topographic Position Index (see poster here) but this doesn't address my conundrum.
I've played with spatial scale in the past with various image processing applications but these have always taken a mean value from a kernel of varying size - they have not been concerned with the specific locations of pixels within the kernel.
I am certainly not the first to think about this problem - does anyone have any references they can point to that deal with the issues outlined above?