The GEOFence service is a windows service used to track when assets (vehicles) enter, stop, and leave customer defined boundaries. The service sends notifications to the end users who have configured subscriptions to these events.


Application Type:

Windows Service

Operating Mode:

Standalone - Queue Processor


Message Filter:

Processes R-Indexes (1, 2, 8, 9,13,14,15, 23, 25, 26, 52, 60, 61, 103) messages with valid lat + long coordinates received within 24 hrs

Service Name:


Queue Name:


Hosted On:

All Parser Servers - GEOTrac

Cache Usage:

Heavy - via the GEOFence Cache Service

High Level Process

The GEOFence service checks each message and evaluates it to see if it is within the GEOFence, or outside of the GEOFence.

The GEOFence Service uses .Net remote to call the GEOFence Cache Service to check the last reported location of the asset and performs a comparison of the information. If the vehicle is entering or leaving the GEOFence then a notification is sent to the users who are subscribed to notifications from the specific GEOFence.

Each GEOFence definition can have several different relationships with Users who should be notified when assets enter/exit the GEOFence.

Each message updates the cache with the last known location of the vehicle.

Rules for GEOFence Checks

Note: GEOFence configurations can overlap the same Lat/Long and, therefore multiple passes are necessary to evaluate each GEOFence configuration.

Load the GEOFence list from the customer database.

  1. Compare each GEOFence expiry date with the message received date
    1. If the GEOFence has expired, set the geofence as expired (ArchiveItem = 1); this stops the fence from being evaluated on the next message
    2. Proceed to the next fence
  2. Compare the received message time with the expiry date
    1. If the received message time is greater than the expiry date AND the Asset has not exited the GEOFence, then mark the vehicle as having exited
    2. Proceed to the next fence
  3. Check to see if the Asset ID is contained within the notification subscription
    1. If this asset isn't one a user is interested in receiving notifications for proceed to the next fence
  4. Each GEOFence configuration is allocated to either a Land Description, City, Marker, Port, or road segment
    1. If it is land description then an exact match on the land description is performed
    2. Otherwise a check to see if the current location is evaluated for presence within the radius of circle from the GEOFence (mathematical calculation, not database spatial)
  5. Raise a notification 

Rules for Notification

  1. If it is not an Enter or Exit notification
    1. Do not notify
  2. Generate the contact list from the GEOFence notification configuration
  3. Send a message per contact to the notification service for sending of the notifications