title: algorithm to define a geofence and see if a point is inside/outside it
body: <p>I am looking for an algorithm through I can create a geofence and check if a device is entering/leaving the fence. I have looked at point in polygon algorithms (ray casting and winding number) but are there any algorithms which can be applied to circle and any irregular shapes as well? The important constraint is time efficiency.</p>
  
  <p>Thank you.</p>