Geo-fencing: taking an action when a lat/lng point enters or exits a geographi shape

Good, or common, uses of geo-fencing include: location tracking of objects and users, lifehacking, games (in the form of run-arounds, check-ins), and hyper-local ads and offers. Apps that are obvious employers of geo-fences include: foursquare (check-in reminders). The code below code calculates great-circle distances between the two points – that is, the shortest distance over the earth’s surface – using …