Route Intersection

Contents

The Route Intersection API returns all of the geofences that the given route intersects with. You can additionally filter by Geofence SetId, Geofence SetName, Geofence SetTag, or Geofence Name to check if your route intersects with a specific fence or set of fences. The response will be an array of geofences that your route intersects with.

POST /Geofence/Intersection/Route #

Request Element #

The Route Intersection operation requires JSON format data in the POST body.

Element Definition Required
setIds An array of geofence set Ids to check the supplied route against. N
setNames An array of geofence set names to check the supplied route against. N
setTags An array of geofence set tags to check the supplied route against. N
intersectTime The time to use against the startTime and endTime windows of geofences and geofence sets when checking if the geofence is active. If not supplied, the current UTC time is used. The time should be formatted according to the ISO 8601 Standard (YYYY-MM-DDTHH:MM:SSZ) N
route An array of latitude and longitudes that represent the route. Y

Sample JSON Post Body

{
  "setIds": [1, 57, 1013],
  "setNames": ["mySet"],
  "setTags": ["tag1", "tag2", "tag3"],
  "intersectTime": "2016-10-13T16:20:00Z",
  "route": [
    [-74.654724, 40.388249],
    [-74.654628, 40.388176],
    [-74.653763, 40.386752],
    [-74.654199, 40.386108],
    [-74.654184, 40.384804],
    [-74.65358, 40.382148],
    [-74.655096, 40.380683],
    [-74.656543, 40.378925],
    [-74.657097, 40.375468],
    [-74.659289, 40.372397],
    [-74.65942, 40.37082],
    [-74.657863, 40.368598],
    [-74.657378, 40.368399],
    [-74.656268, 40.368067],
    [-74.655551, 40.367482]
  ]
}

Response #

{
  "results": [
    {
      "fenceId": 3,
      "name": "Princeton",
      "setId": 2
    },
    {
      "fenceId": 5,
      "name": "ALK",
      "setId": 2
    },
    {
      "fenceId": 23,
      "name": "ALK Office",
      "setId": 3
    }
  ]
}

Errors #

Data Element Description Data Type Value/Example
Type Indicates whether the error is an exception or warning
Enum
Warning
Exception
Code Error code
Enum
Please refer to Appendix for complete list
LegacyErrorCode The legacy error code with is an integer valued code that would have been returned in PC*MILER Web Services v25 and earlier.
Int
Description The detailed error description.
string
Last updated December 4, 2020.