Query methods¶
Before interpolating, the neighbours of each point are searched with a KDTree. Which point set the tree is built on depends on the kernel family.
QUERY_TYPE.K¶
Returns the param nearest neighbours (param must be an integer). It always returns
exactly K points, even if some are very far: use max_distance to discard them.
QUERY_TYPE.RADIUS¶
Returns all neighbours within a sphere of radius param. The number of neighbours
varies from point to point and can be zero.
Filters applied after the query¶
max_distance- Neighbours farther than
max_distanceare discarded. WithQUERY_TYPE.RADIUSit is effective only when smaller than the radius. coincidence_tolerance- If the neighbour is closer than this tolerance, the two points are considered coincident and the value is copied directly, skipping the kernel.
Choosing the parameters
max_distanceshould be a few times the typical spacing of the coarser of the two point sets: big enough to always find a neighbour, small enough not to pick points from a different part of the geometry.coincidence_toleranceshould be much smaller than the mesh size, e.g. a fraction of the smallest element.