interpolate_to_grid past bounds #3065
-
I am interpolating scatter data to a natural neighbor grid and was wondering how I could get the grid to fill the bounding box? Currently, it seems to stop right on the farthest data points and then fills the rest with nan. This makes for a rather ugly map. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
As noted in the Stack Overflow question on this, this is due to how natural neighbor interpolation is fundamentally defined. The interpolation is undefined outside the "convex hull" of the source data points. To avoid those empty regions, you'd need to switch to a different interpolation method, or possibly use another method (e.g. nearest neighbor) that is defined in those cases, to fill in the gaps. |
Beta Was this translation helpful? Give feedback.
As noted in the Stack Overflow question on this, this is due to how natural neighbor interpolation is fundamentally defined. The interpolation is undefined outside the "convex hull" of the source data points.
To avoid those empty regions, you'd need to switch to a different interpolation method, or possibly use another method (e.g. nearest neighbor) that is defined in those cases, to fill in the gaps.