Skip To Content
ArcGIS Developer
Dashboard

Check Events

Description

License:

The ArcGIS Location Referencing license is required to use this resource.

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 parameter to specify the response format. The default response format is html.

Values: html | json

eventLayerIds

Required

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

Example: eventLayerIds=[1,2,5,8]

locations

Required

Description: A list of routes and measure ranges to analyze.

Syntax:

[
  { // 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

Description: 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: routeIds=["US101","I280","SR85"]

lineIds

Description: 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: lineIds=["A1","A8","B5"]

checkGaps

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

Values: false | true

checkOverlaps

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

Values: false | true

checkMeasuresNotOnRoute

Description: 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.

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

Syntax: temporalViewDate=<timeInstant>

Example: temporalViewDate=1230768000000 (1 Jan 2009 00:00:00 GMT)

returnGeometry

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

Values: false | true

maxAllowableOffset

Description: 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: 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 parameter to specify the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax: gdbVersion=<version>

Example: gdbVersion="user1.version1"

historicMoment

Optional parameter to specify 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: historicMoment=<epoch time in milliseconds>

Example: historicMoment=1514764800000

This parameter was added at 10.6.1.

Example usage

Example 1

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

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.

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.

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

{
  "spatialReference" : <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

{
  "spatialReference" : { "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] ] }
    }
  ]
}