network_knn_worker function

worker function for K-nearest points on network