DOI-USGS / DOI-USGS/modflow-setup
Normalize 3D coordinates in interp_weights to improve Delaunay triangulation performance
- Dominant language
- Python
- Stars
- 65
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
`interp_weights` can be slow for 3D interpolation for grids with large aspect ratios (x/y spans of tens of kilometers vs. z spans of tens to hundreds of meters). This flat point cloud is difficult for `scipy.spatial.Delaunay` to tessellate efficiently.
## Fix
Scale the source and destination coordinates so each dimension has the same range before building the tessellation. This can follow the same approach as `scipy.interpolate.griddata` with `rescale=True`. The interpolation results would be unchanged because the same scaling is applied to both source and destination points.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.