[gdal-dev] GDAL Interpolation Help

Bill Myers billmyers at google.com
Wed Sep 27 10:44:18 PDT 2023


Hi,
I am new to working with GDAL. We are trying to spatially interpolate
Numerical Weather Prediction (NWP) model data to an arbitrary location,
i.e. lat/lon. We have been using gdal_translate but have been getting
unexpected results.
We have used the resampling method called "average". In this toy example,
we are trying to resample to a grid with twice the density of the input
data set. As can be seen in the image in the link below, the values at
the points that match the input points agree with the input values. That's
good. However, the interpolated values do not match our expectations. We
would expect the interpolated value at the midpoint (directly between two
input points) to be the average of those two input points. As can be seen,
this is not the case.
Can someone please help us understand what we might be doing incorrectly?
Also, does GDAL have the functionality that we are looking for?
Thanks for your help.
-b
https://pasteboard.co/uumLD4JtNmp3.png
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230927/5f5faac2/attachment.htm>


More information about the gdal-dev mailing list