I am finding the shortest distance to the point using this
#find the nearest point and shortest distance
curve=np.column_stack((curve_mrds,curve_nrds)) # <-- the coordinates of the curve
point = points_2 # <-- the point to find
#The distance of the point to the curve
dist=spatial.KDTree(curve).query(point)[0] #<-- The distance of the point to the curve.
The things i want to know, if possible with references -the mathematical equations/logic behind the spatial.KDTree(curve).query(point)[0] -the algorithm behind the spatial.KDTree(curve).query(point)[0]
I have looked in the help as well, but it does not state the mathematical notation or reference to the original algorithm. I originally need references for publications.
The documentation makes this very clear. https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.KDTree.html