Open Access, 30 Nov 2012 Spatial index and query are enabling techniques for achieving the vision of the Internet ofThings. K-NN is an algorithm which…