Answers for "Lookup based range of latitude and longitude"
https://answers.splunk.com/answers/495837/lookup-based-range-of-latitude-and-longitude.html
The latest answers for the question "Lookup based range of latitude and longitude"Answer by DalJeanis
https://answers.splunk.com/answering/496832/view.html
How dense is the data? That is, are the events likely to be within 500 miles of a high percentage of the locations, or just a few of them?
How many locations are on your lookup table? Presumably, the list of locations is much smaller than the list of event locations.
So, one possible solution would be to think in terms of "regions". Let's say that your latitude and longitude for the event, for lookup purposes, will be rounded to the nearest 1 degree, or 3 degree, or 5 degree point.
At the 5-degree level, latitude="34.49293" and longitude="132.399270" would go to lookupLatLong="35,130"
Now, on your lookup location table, you create a multivalue field for each location that has all the lookupLatLong values that might have a point within 500 miles of the location.
This way, a single lookup returns all candidate locations that MIGHT be within 500 miles. Then you use an accurate calculation to estimate the distance more closely, for example the spherical law of cosines -
=ACOS( SIN(lat1)*SIN(lat2) + COS(lat1)*COS(lat2)*COS(lon2-lon1) ) * 3962Fri, 03 Feb 2017 19:27:22 GMTDalJeanis