- URL:
- https://<centerline-layer-url>/queryRouteAssociations
- Methods:
GET
- Required Capability:
- The ArcGIS Location Referencing license is required to use this resource.
- Version Introduced:
- 10.7
Description
This operation finds route records across all networks that are associated with the input centerlines. It returns valid associations for records that are present in both the centerline sequence and network tables and are overlapping in their time spans.
Request parameters
Parameter | Details |
---|---|
(Optional) |
Specifies the response format. The default response format is Values: |
(Optional) | Specifies an array of input centerline IDs. Syntax:
Example:
|
(Optional) | Specifies an array of input centerline Object IDs. Syntax:
Example:
|
(Optional) |
Specifies the geodatabase version to use. If this parameter is not specified, the published map's version is used. Syntax:
Example:
|
(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:
Example:
|
Example usage
The following URLs demonstrate how to query route associations using centerline attributes.
Example 1
A query with only centerline Object IDs:
https://sampleserver/server/rest/services/MyLRS/MapServer/exts/LRServer/centerlineLayers/4/queryRouteAssociations?centerlineIds=¢erlineObjectIds=[0,1]&gdbVersion=SDE.default&historicMoment=&f=json
Example 2
A query with only centerline ID:
https://sampleserver/server/rest/services/MyLRS/MapServer/exts/LRServer/centerlineLayers/4/queryRouteAssociations?centerlineIds=["{0C9963C9-4F34-4363-A369-E9D8E56D0142}"]¢erlineObjectIds=&gdbVersion=SDE.default&historicMoment=&f=json
Example 3
A query with both centerline ID and Object IDs:
https://sampleserver/server/rest/services/MyLRS/MapServer/exts/LRServer/centerlineLayers/4/queryRouteAssociations?centerlineIds=["{0C9963C9-4F34-4363-A369-E9D8E56D0142}"]¢erlineObjectIds=[0,1]&gdbVersion=SDE.default&historicMoment=&f=json
JSON Response syntax
Each object in the associations
array refers to a unique centerline. Each object in the networks
array refers to a unique network. Each object in the routes
array refers to a unique route.
For associations where the network is not present in the service, network
will be set to -1
. The line
parameter will be populated for routes in engineering networks, and otherwise, they will be set to empty strings.
{
"associations": [
{
"centerlineId": "<centerlineGuid>",
"centerlineObjectId": "<centerlineOid>",
"networks": [
{
"lrsNetworkId": "<networkId>",
"networkLayerId": "<networkLayerId>",
"lrsNetworkName": "<networkName>",
"routes": [
{
"routeId": "<routeId>",
"lineId": "<lineId>",
"fromDate": "<epochTimeInMilliseconds>",
"toDate": "<epochTimeInMilliseconds>"
},
...
]
},
...
]
},
...
]
}
JSON Response example
The following is a response to the third example usage. Common centerline IDs and Object IDs in the input are merged into one associations
object.
{
"associations": [
{
"centerlineId": "{0C9963C9-4F34-4363-A369-E9D8E56D0142}",
"centerlineObjectId": 0,
"networks": [
{
"lrsNetworkId": 2,
"networkLayerId": 1,
"lrsNetworkName": "Continuous",
"routes": [
{
"routeId": "R1",
"lineId": "",
"fromDate": 1505429729000,
"toDate": null
}
]
},
{
"lrsNetworkId": 1,
"networkLayerId": 2,
"lrsNetworkName": "Engineering",
"routes": [
{
"routeId": "R2",
"lineId": "L1",
"fromDate": 1535429729000,
"toDate": null
},
{
"routeId": "R3",
"lineId": "L2",
"fromDate": 1494434529000,
"toDate": 1713292129000
}
]
}
]
},
{
"centerlineId": "{DE3A5E8C-EAC6-4916-BA56-CC6484257F59}",
"centerlineObjectId": 1,
"networks": [
{
"lrsNetworkId": 2,
"networkLayerId": 1,
"lrsNetworkName": "Continuous",
"routes": [
{
"routeId": "R4",
"lineId": "",
"fromDate": 1505428029000,
"toDate": 1605428029000
},
{
"routeId": "R5",
"lineId": "",
"fromDate": 1484434529000,
"toDate": 1513292129000
}
]
}
]
}
]
}