Skip to content

Normalize 3D coordinates in interp_weights to improve Delaunay triangulation performance #140

Description

@ntdosch

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions