[Developers]

Geofence Domain

A surveillance team is tracking a subject who is subject to an exclusion zone around a court building. The moment the subject's device enters within 200 metres of the building, the assigned officer receives an alert. Whe

Category: Api DomainsLast Updated: Feb 5, 2026
api-domainsgeospatial

Overview#

A surveillance team is tracking a subject who is subject to an exclusion zone around a court building. The moment the subject's device enters within 200 metres of the building, the assigned officer receives an alert. When the device lingers inside that zone for more than ten minutes, a dwell alert fires. When it leaves, an exit alert is logged. The Geofence domain creates and manages those spatial boundaries, matches incoming device locations against them in real time, and triggers configurable alerts based on entry, exit, and dwell events.

Geofences give spatial meaning to device telemetry. A stream of GPS coordinates becomes operationally meaningful when an analyst can define a boundary, name it, and receive automatic notification when a tracked device crosses it.

Key Features#

  • Multiple geofence geometry types: circle, polygon, rectangle, and corridor
  • Entry, exit, and dwell alerting with configurable dwell thresholds
  • Import from KML and GeoJSON formats for boundary data from external mapping tools
  • Device location recording with automatic geofence matching on each position update
  • Point-in-geofence checking and distance-to-edge calculation
  • Geofence overlap detection across active boundaries
  • Priority levels and tag-based organisation
  • Investigation linking and geofence expiration support

Use Cases#

  • Creating perimeter alert zones around locations of interest with automatic entry and exit notifications for surveillance operations
  • Defining transit corridor geofences to monitor whether tracked devices follow or deviate from expected routes
  • Importing boundary data from external GIS and mapping tools via KML or GeoJSON formats
  • Tracking device movements across multiple active geofences in real time and detecting violations immediately

Industry Context#

Law enforcement agencies use geofences to enforce bail conditions: exclusion zones around complainants' addresses or court buildings trigger immediate alerts if a subject's device enters the boundary. Counter-terrorism teams define surveillance perimeters around sites of interest and receive automatic alerts when monitored devices approach. Border security agencies create corridor geofences along approved transit routes and detect deviations. Critical infrastructure operators define protective perimeters around facilities and alert security teams when unauthorised devices enter.

Integration#

The Geofence domain integrates with Doc Alert for duty-of-care geofence alerts, Location for profile management, and Device Tracking for position updates. Geofence definitions and match events are stored in PostgreSQL with spatial indexing for fast boundary queries.

Open Standards#

  • GeoJSON (RFC 7946): Boundary geometries are stored, imported, and exported as GeoJSON; the PostGIS functions ST_GeomFromGeoJSON and ST_AsGeoJSON are used throughout all spatial queries and the KML-to-geofence conversion pipeline converts to GeoJSON as the canonical internal format.
  • OGC KML 2.2: Geofence boundaries can be imported from and exported to Keyhole Markup Language files, allowing interoperability with GIS mapping tools and applications that produce KML-formatted polygons.
  • WGS 84 / EPSG:4326: All coordinate data is stored and processed in the World Geodetic System 1984 reference frame; every point and geometry construction uses ST_SetSRID with SRID 4326 to ensure geodetically accurate containment tests and distance calculations.
  • OGC Simple Features Access (ISO 19125): Spatial predicates including ST_Contains, ST_Intersects, ST_DWithin, ST_Buffer, and ST_Distance implement the OGC Simple Features geometry model for point-in-polygon testing, overlap detection, corridor buffering, and distance-to-edge calculation.
  • GraphQL (June 2018 specification): The entire query and mutation interface for creating, updating, importing, and querying geofences and alert events is exposed as a typed GraphQL API.
  • OAuth 2.0 / JWT (RFC 6749 / RFC 7519): Access to geofence mutations and queries is gated by JWT bearer tokens whose claims carry the tenant organisation identifier used for all row-level isolation.
  • ISO 8601: All timestamps for geofence creation, update, expiration, and alert events are serialised and parsed using ISO 8601 format, ensuring unambiguous interchange of time data across the platform.

Last Reviewed: 2026-02-05 Last Updated: 2026-04-14

Ready to Build?

Get started with our APIs or contact our integration team for support.