knn_weights function

K-Nearest Neighbors-based Spatial Weights