I have a GDAL raster that looks like this:
And I would really like to blur this raster along an arbitrary transect.
I see that scipy.ndimage has a gaussian filter that allows me to blur the raster along a given axis, as long as the axis is valid given the raster's numpy matrix. Doing so with the default axis of
sigma=2) looks like this:
This raster is pretty close to what I'm looking for, I'd just really like to have this filtering not strictly happen along the horizontal axis, if that's possible.
So my questions are thus:
- Is it possible to filter the matrix along an arbitrary axis, such as an axis that is not necessarily along the vertical or horizontal?
- Is it possible to do so just with Numpy/Scipy and GDAL?