N-dimensional distance metrics & K-nearest neighborhoods for point queries
thi.ng/distance
thi-ng/umbrella