A nearest landmark can change when a robot map search switches distance metrics, even if the map and query coordinates stay fixed. A radius has the same dependency. Before comparing two reports, check which distance each search used and verify that the coordinates share a frame and units.
Reproduce the change with two candidates
Place the query at the origin of a planar map in meters. The first candidate is at 4 meters along the horizontal axis. The second is 2.5 meters away in each coordinate. Manhattan distance adds the absolute coordinate differences, so the first candidate is 4 meters away and the second is 5. Euclidean distance measures the straight line. It still gives 4 for the first candidate but gives about 3.536 for the second.
SciPy lets both the nearest-neighbor and radius queries choose the Minkowski norm with the parameter p. Use p equal to 1 for Manhattan distance and p equal to 2 for Euclidean distance.
import numpy as np
from scipy.spatial import KDTree
points = np.array([[4.0, 0.0], [2.5, 2.5]])
tree = KDTree(points)
origin = [0.0, 0.0]
d1, i1 = tree.query(origin, p=1)
d2, i2 = tree.query(origin, p=2)
assert (d1, i1) == (4.0, 0)
assert i2 == 1 and np.isclose(d2, np.sqrt(12.5))
assert tree.query_ball_point(origin, r=3.75, p=1) == []
assert tree.query_ball_point(origin, r=3.75, p=2) == [1]
With SciPy 1.18.1 and NumPy 2.5.5, the nearest match changes from index 0 to index 1. The radius query also changes. With a radius of 3.75 meters, the first metric finds no candidates while the second includes index 1. Neither result sits right on the boundary, which keeps the example focused on the metric.
Keep distance and travel cost distinct
Euclidean distance measures direct separation. Manhattan distance measures coordinate differences along the chosen axes. In a planar map it can describe the length of an unobstructed path along those axes, but a warehouse route may have barriers, one-way aisles, or unavailable intersections. If the question is which landmark a robot can reach by the lowest-cost route, use the map's navigation graph and allowed routes for that comparison.
Save the selected metric, query radius, coordinate frame, and units beside the result. If an application uses Euclidean straight-line distance for geometry and a separate path cost for routing, give each value a distinct field. That allows a reviewer to reproduce the neighborhood and see why a geometrically close point might be expensive to reach.
Sources
SciPy KDTree nearest-neighbor query reference for Minkowski distance and result indices
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.KDTree.query.html
SciPy KDTree radius query reference for neighbor inclusion under a selected metric
https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.KDTree.query_ball_point.html