I need to search for all objects within X miles of a set of known geo-located lat-longs. I've been looking at the geolocation features of SF but I don't see any mention of using multiple targets for the query. I'm sure I could do something like:
WHERE DISTANCE(mylocation1, mylocation2, 'unit') OR DISTANCE(mylocation1, mylocation3, 'unit') OR ...
However, This isn't a set of 10, or 20 points, but more like a set of 10-150 thousand points.
- Given a Object (named Intersection) containing LAT/LONG for every intersection named 1st and Martin Luther King Dr.
Given an Object (named Resturant) containing LAT/LONG for every McDonalds Restaurant in the US.
I want to find every intersection within 10 miles of any McDonalds restaurant in the US.
Fun right? Any ideas on how to do this? I'm sure I'd hit query limits before I enumerated all the various restaurant locations.