Check Events

URL:
https://<network-layer-url>/checkEvents
Methods:
GET
Required Capability:
The ArcGIS Location Referencing license is required to use this resource.
Version Introduced:
10.6

Description

This operation detects common types of quality control errors in event data, such as the following:

  • Gap—A section of a route where no event is defined for a given event layer.
  • Overlap—A section of a route where more than one event is defined for a given event layer.
  • Invalid measure—Reported when an event extends beyond the range of measures defined for a route.

Request parameters

ParameterDetails

f

(Optional)

Specifies the response format. The default response format is html.

Values: html | json | pjson

eventLayerIds

(Required)

A comma-separated list of layer IDs for the event layers to analyze.

Example:

Use dark colors for code blocksCopy
1
eventLayerIds=[1,2,5,8]

locations

(Required)

A list of routes and measure ranges to analyze.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[
  { // analyze an entire route (start measure to end measure)
    "routeId": "<routeId>"
  },
  { // analyze a measure range
    "routeId": "<routeId>",
    "fromMeasure": <measure>,
    "toMeasure": <measure>
  },
  { // analyze a measure range spanning multiple routes
    // this is valid only for networks that support lines
    "routeId": "<routeId>",
    "toRouteId": "<routeId>",
    "fromMeasure": <measure>,
    "toMeasure": <measure>
  },
  ...
]

routeIds

A comma-separated list of route IDs for the routes to analyze. The list must be in JSON array form to preserve any space characters in route IDs.

Example:

Use dark colors for code blocksCopy
1
routeIds=["US101","I280","SR85"]

lineIds

A comma-separated list of line IDs corresponding to the routes to analyze. This parameter applies only to networks that support lines. The list must be in JSON array form to preserve any space characters in line IDs.

Example:

Use dark colors for code blocksCopy
1
lineIds=["A1","A8","B5"]

checkGaps

If true, checks for event gaps. The default is false.

Values: false | true

checkOverlaps

If true, checks for event overlaps. The default is false.

Values: false | true

checkMeasuresNotOnRoute

If true, checks for invalid event measures. The default is false.

Values: false | true

temporalViewDate

The time instant to use as a temporal view date when locating route features. If this parameter is not specified, the current date is used.

The parameter value is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax:

Use dark colors for code blocksCopy
1
temporalViewDate=<timeInstant>

Example:

Use dark colors for code blocksCopy
1
temporalViewDate=1230768000000 (1 Jan 2009 00:00:00 GMT)

returnGeometry

If true, the response includes the geometry associated with each result. The default is true.

Values: false | true

maxAllowableOffset

Specifies the maximum allowable offset to be used for generalizing geometries returned in the results. This parameter can be used to reduce the size of the response data.

The maxAllowableOffset is in the units of outSR. If outSR is not specified, maxAllowableOffset is assumed to be in the unit of the spatial reference of the map.

Example:

Use dark colors for code blocksCopy
1
maxAllowableOffset=2

outSR

The spatial reference of the returned geometry.

The spatial reference can be specified as either a Well-Known ID (WKID) or a spatial reference JSON object.

If outSR is not specified, the output geometries are in the spatial reference specified by inSR. If inSR is also not specified, the output geometries are in the spatial reference of the map.

gdbVersion

(Optional)

Specifies the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax:

Use dark colors for code blocksCopy
1
gdbVersion=<version>

Example:

Use dark colors for code blocksCopy
1
gdbVersion="user1.version1"

historicMoment

(Optional)

Specifies the historic moment to query. This parameter applies only if the layer is branch versioned and refers to geodatabase time (separate from LRS time).

If this parameter is not specified, the query applies to the current features.

Syntax:

Use dark colors for code blocksCopy
1
historicMoment=<epoch time in milliseconds>

Example:

Use dark colors for code blocksCopy
1
historicMoment=1514764800000

Example usage

Example 1

URL for checking for event gaps on a single route and a single event layer.

Use dark colors for code blocksCopy
1
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/checkEvents?f=json&eventLayerIds=\[3]&routeIds=\["I90"]&checkGaps=true&outSR=102100

Example 2

URL for checking for event gaps and overlaps on a route section and a single event layer.

Use dark colors for code blocksCopy
1
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/checkEvents?f=json&eventLayerIds=\[4]&locations=\[{'{'}"routeId":"I90","fromMeasure":0.5,"toMeasure":1.75{'}'}]&checkGaps=true&checkOverlaps=true

Example 3

URL for checking for all error types on multiple routes and multiple event layers.

Use dark colors for code blocksCopy
1
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/checkEvents?f=json&eventLayerIds=\[3,5,6,7]&routeIds=\["I90","US20"]&checkGaps=true&checkOverlaps=true&checkMeasuresNotOnRoute=true

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "": <spatialReference>,
  "results": [
    {
      "type": "<errorType>",  // Gap, Overlap, MeasureNotOnRoute
      "layerId": <eventLayerId>,
      "routeId": "<routeId>",
      "routeName": "<routeName>",
      "toRouteId": "<routeId>",    // only for event layers that can span routes
      "toRouteName": "<routeName>",  // only for event layers that can span routes
      "lineId": "<lineId>",       // only for event layers that can span routes
      "lineName": "<lineName>",     // only for event layers that can span routes
      "eventId": "<eventId>",      // only for MeasureNotOnRoute
      "fromMeasure":< fromMeasure>,
      "toMeasure": <toMeasure>,
      "geometryType": "<geometryType>",  // esriGeometryPolyline (for Gap and Overlap), esriGeometryMultipoint (for MeasureNotOnRoute)
      "geometry": <geometry>
    },
    ...
  ]
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  "": { "wkid": 102100 },
  "results": [
    {
      "type": "Gap",
      "layerId": 3,
      "routeId": "I90",
      "fromMeasure": 0.2,
      "toMeasure": 1.55,
      "geometryType": "esriGeometryPolyline",
      "geometry": { "paths": [ [ [-8704473, 5352043], [-8710354, 5360311], [-8704419, 5352063] ] ] }
    },
    {
      "type": "Overlap",
      "layerId": 3,
      "routeId": "I90",
      "fromMeasure": 2.0,
      "toMeasure": 2.7,
      "geometryType": "esriGeometryPolyline",
      "geometry": { "paths": [ [ [-8704419, 5352063], [-8710014, 5360361] ] ] }
    },
    {
      "type": "MeasureNotOnRoute",
      "layerId": 5,
      "routeId": "I90",
      "eventId": "1348",
      "fromMeasure": 0,
      "toMeasure": 10.4,
      "geometryType": "esriGeometryMultipoint",
      "geometry": { "points": [ [-8710037, 5360371], [-8704473, 5352043] ] }
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.