Geofence
What IS a Geofence?
A geofence is an arbitrary area defined around a trailer, or other asset. Geofences are always rectangular, with a specified height and width. The dimensions can be specified when setting a trailer's geofence.
Each trailer can have its own geofence definition. Geofences are not defined outside of a trailer context, that is, there are no standalone geofence definitions, they are always associated with a trailer.
Geofences are typically used to establish a "region" into which the trailer should or should not cross. Users can establish a geofence around a trailer, and then be notified when the trailer moves outside the geofence region. For example, an asset is dropped in a yard. A geofence is established, roughly the size of the yard. If the trailer leaves the geofence (ie: leaves the yard), a user may wish to be notified.
Geofence Object
Information about a geofence is implemented in the Geofence object. The attributes of the Geofence object are:
Attribute
|
Description
|
---|---|
desc |
A string of maximum length 40 that contains a description of the geofence. |
centerPref |
Indicates the center option for the geofence. A self-centered geofence uses the trailer's position, as of the geofence start date, as its centerpoint. A lat/long-centered geofence uses a specified latitude and longitude as its centerpoint. Possible values are: |
centerLat |
A floating point (double) value containing the latitude of the geofence centerpoint in decimal degrees. A positive value indicates the northern hemisphere. A negative value indicates the southern hemisphere. |
centerLon |
A floating point (double) value containing the longitude of the geofence centerpoint in decimal degrees. A positive value indicates the eastern hemisphere. A negative value indicates the western hemisphere. |
nsLength |
A floating point (double) value containing the north/south length (height) of the geofence. U.S. and Imperial valid range is .32 - 620.0 miles. Metric valid range is .5 - 1000.0 kilometers. |
ewLength |
A floating point (double) value containing the east/west length (width) of the geofence. U.S. and Imperial valid range is .32 - 620.0 miles. Metric valid range is .5 - 1000.0 kilometers. |
startDate |
A string containing a timestamp in the form YYYY-MM-DDTHH:MM:SSZ indicating the activation time in GMT of the geofence. Geofences are only considered "active" if the current time is between the geofence start and stop dates. Only active geofences will generate geofence alerts. |
stopDate |
A string containing a timestamp in the form YYYY-MM-DDTHH:MM:SSZ indicating the deactivation time in GMT of the geofence. Geofences are only considered "active" if the current time is between the geofence start and stop dates. Only active geofences will generate geofence alerts. |
active |
A string indicating whether or not the geofence is active. Possible values are: |
ongoing |
A string indicating whether or not the geofence is ongoing. If a geofence is ongoing, the value in the stop date will be ignored. Possible values are: |
checkInt |
A string in the form +DDDDDHHMMSS indicating the interval the terminal will check its geofence position status when not under external power. Possible values are: |
entryAction |
A string indicating the action taken by the terminal when a trailer enters the geofence. Possible values are: |
exitAction |
A string indicating the action taken by the terminal when a trailer exits the geofence. Possible values are: |
WSDL Definition
The WSDL defines a Geofence structure in this manner:
|
Example XML
An example of a Geofence structure contained within an XML request or response:
|