[gdal-dev] Fwd: Re: Wondering gdal_grid moving average interpolation

a.hagen-zanker at surrey.ac.uk a.hagen-zanker at surrey.ac.uk
Sat Mar 10 03:26:35 PST 2018




Hi Ari,

Interesting result. It looks roughly right: pixels with only dark points in their surrounding window are dark and pixels with only light point in the window are light.

However, it does seem that the legend used for pixels uses different interval values than that for the pixels. Otherwise it would be hard to explain why pixels that have only a single point in their window do not have the same color as that point.

The second thing that is concerning is the ragged edge of the apparent circles. It suggests that the distance calculation is not accurate. It shouldn't be more than a pixel off.

You will always have these awkward edge effects in moving window analysis. However it can be reduced by 1) using a window radius considerably larger than the distance between points. 2) use a distance weighted kernel (my weapon of choice).

Kind regards, Alex
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of Ari Jolma <ari.jolma at gmail.com>
Sent: Saturday, March 10, 2018 10:00:00 AM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Wondering gdal_grid moving average interpolation

I'm translating things on QGIS and now looking at GDAL tool rasterizing
point data set with moving average interpolation.

That's making a call to gdal_grid with -a average.

I've got the attached result from a point set (circles with red border
and inside inverse grayscale with interpolated value). The call was

gdal_grid -l INPUT -zfield suuntap -a
average:radius1=8000.0:radius2=8000.0:angle=0.0:min_points=0:nodata=0.0
-ot Float32 -of GTiff INPUT.shp OUTPUT.tif

I'm wondering is that the expected since it looks like the raster cell
value is determined by point locations. I would have expected a much
more smooth surface without any obvious circular shapes. To me it looks
like the computation was not done cell by cell but instead point by point.

What am I missing or misunderstanding?

Ari

ps: This tool is in group 'Raster analysis'. In my opinion it should be
in a group 'Point data tools' or something.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180310/66277dfe/attachment.html>


More information about the gdal-dev mailing list