Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have two LatLongs, what is the best way to determine if the first one is within a 10 mile radius of the second?

share|improve this question
Duplicate of:… – Rowland Shaw Jul 30 '10 at 12:07
Voting to close as an exact duplicate. – whuber Mar 10 '11 at 2:11
up vote 4 down vote accepted

The following thread provides algorithms for calculating distance between lat/long coordinate pairs.

After that, just do a conditional, like: if (distance <= 10):

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.