I have a database with millions of lat/long pairs. I would like to implement a function to gather all lat/long pairs within a specified distance from a given lat/long pair. Is there a better way to do this than by iterating over each pair in the database and computing the distance between that pair and the given pair? I'd like to avoid brute force if I can avoid doing so!
I would like to add that I will never be searching for lat/long pairs greater than 1 mile from the given lat/long pair.