I have a set of geo-tagged pictures in mySql database. You can consider my Pictures table to be:
create table `Pictures` (
location Point NOT NULL,
timeCreated timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
SPATIAL INDEX(location)
)ENGINE= MyISAM DEFAULT CHARSET=utf8;
I intend to perform a K-Nearest Neighbor algorithm based on the location of the pictures. Say, if K=10, select the 10 pictures which are geographically closest to the user location.
I appreciate your suggestions.