Anatomy of a geofence
The simplest geofence is a point and a radius: latitude 28.4595, longitude 77.0266, radius 120 m. The system computes the straight-line distance from the punch coordinate to the centre and compares it with the radius. Polygon geofences store an ordered list of corner coordinates and use a point-in-polygon test; they suit L-shaped plots, long industrial sheds and campuses with a public road cutting through.
A geofence record in an attendance system usually also carries a name, an address for humans, the list of employees or shifts allowed to punch there, and an action on breach – block, flag or ask for a reason. The action belongs to geofencing attendance policy; the geofence itself is only the shape.
Setting the centre and radius correctly
Set the centre where people actually punch, not at the postal address pin. For a housing society the guard cabin at the main gate is the right centre; for a warehouse it is mid-plot so both gates fall inside. Drop the pin from the admin console's map view, or capture it by standing at the spot with the app.
The radius must absorb GPS drift. Phones under clear sky report 5–15 m accuracy but the reported point still wanders by that much between punches; under a shed roof or between towers drift rises to 30–50 m. A radius smaller than roughly twice the typical drift at that site will reject honest punches. The bands in the geofencing entry (50–75 m for offices up to 200–300 m for factories) are a starting point, not a rule.
- Centre on the actual punch point (gate, cabin, time office), not the address
- Radius at least 2x typical GPS drift at that site
- Use a polygon for long or irregular plots rather than one huge circle
- Name geofences the way supervisors talk about sites (e.g. 'Sector 62 Tower B gate')
Indoor, industrial-estate and multi-tenant considerations
GPS does not reach basements or deep interiors, so a geofence cannot be tested reliably there. Options are to place the punch point at the entrance (guards punch at the gate before going to the basement post), to allow an offline punch with the last known fix, or to use a QR code fixed at the post as a second location proof.
In industrial estates and commercial towers, several clients may sit within 100 m of each other. Separate geofences with overlapping circles will both accept a punch; the fix is to assign each guard to a specific site so the punch is tested only against the rostered site's fence. This is also how guard deployment records stay honest when one agency serves neighbouring units.
An IT campus in Whitefield has a main gate, a service gate 350 m away, and an underground parking post. The agency creates three geofences: main gate 80 m, service gate 80 m, and a 120 m fence at the parking ramp entrance where the basement guard punches before descending. Each post is assigned only its own fence, so a guard cannot cover a colleague's post from across the campus.
Attend Mitra lets admins create multiple geofences per company from a map view, set a radius per site, assign employees or shifts to sites, and see every punch's distance from the fence on the live monitor and in reports.
