-
Notifications
You must be signed in to change notification settings - Fork 86
Add natural neighbor (Voronoi-based) interpolation #1153
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Motivation
The interpolation module currently has IDW, kriging, and spline, but is missing natural neighbor interpolation. This is one of gdal_grid's interpolation methods and is often preferred over IDW because it produces smoother surfaces without the "bullseye" artifacts that IDW tends to create around data points.
Proposed scope
- Given scattered points (x, y, value), produce a gridded raster using Sibson's natural neighbor method.
- The method works by constructing Voronoi diagrams: the interpolated value at a query point is a weighted average of nearby data points, where each weight is proportional to the area "stolen" from that point's Voronoi cell when the query point is inserted.
- Should follow the same interface as the existing
idw()andkriging()functions.
Implementation notes
The Voronoi computation is the expensive part. For the numpy path, scipy.spatial.Voronoi can be leveraged. The GPU path would need a custom Voronoi implementation or a different algorithmic approach.
Additional suggestion
Also worth considering: a simple moving-average gridding method (another gdal_grid mode) as a cheaper alternative for cases where the smoothness of natural neighbor isn't needed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request