get_minimum_distances_boundaries#
- get_minimum_distances_boundaries(domain, population_A, population_B, bypass_checks=False, ignore_self=False)#
Calculates the smallest distance from each object specified by objects_identifier_A to an object specified by objects_identifier_B. This function uses the boundary of each object - for shapes, this will be the shape boundary.
- Parameters:
- domainmuspan.domain
A muspan domain.
- population_Aquery-like
The first population of objects or a query to select them.
- population_Bquery-like
The second population of objects or a query to select them.
- bypass_checksbool, optional
If True, standard checks on whether this query can be interpreted are bypassed. May generate unexpected crashes if objects that can’t be interpreted as a query are passed in, but generates a substantial speed increase for large datasets when we’re confident the query is formatted correctly. Defaults to False.
- ignore_selfbool, optional
If True, then if the same object ID is present in population_A and population_B, do not return the distance to itself (0) as the minimum distance. Defaults to False.
- Returns:
- distancesndarray
Array containing minimum distances from each object in object_indices_A to an object specified in objects_identifier_B.
- object_indices_Andarray
Array containing object indices specified by objects_identifier_A.
- nearest_Bndarray
Array containing the indices of the nearest objects in objects_identifier_B for each object in object_indices_A.
- minimising_points_Andarray
Array containing the points on the boundary of objects in object_indices_A that are closest to the nearest objects in objects_identifier_B.
- minimising_points_Bndarray
Array containing the points on the boundary of the nearest objects in objects_identifier_B that are closest to the objects in object_indices_A.