- URL:
- https://<network-layer-url>/translate
- Methods:
- GET
- Required Capability:
- The ArcGIS Location Referencing license is required to use this resource.
- Version Introduced:
- 10.6
Description
This operation translates route measures from one network's linear referencing method (LRM) to that of another network. This operation can be used to locate concurrent routes in a target network.
Request parameters
| Parameter | Details | 
|---|---|
| 
 (Optional) | Specifies the response format. The default response format is  Values:  | 
| 
 (Required) | A list of routes and measure values to translate. Syntax:  | 
| 
 (Required) | A comma-separated list of layer IDs into which the network layers translate. Example:  | 
| 
 | 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: Example:  | 
| 
 (Optional) | Specifies the geodatabase version to use. If this parameter is not specified, the published map's version is used. Syntax: Example:  | 
Example usage
The following examples demonstrate measure translation.
Example 1
URL for translating the entire measure span of a route.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/translate?f=json&locations=[{"routeId":"I90"}]&targetNetworkLayerIds=[4]Example 2
URL for translating a single measure on a route.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/translate?f=json&locations=[{"routeId":"I90","measure":25}]&targetNetworkLayerIds=[2,5]Example 3
URL for translating a measure range on a route.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/translate?f=json&locations=[{"routeId":"I90","fromMeasure":25.1,"toMeasure":26.8}]&targetNetworkLayerIds=[4]Example 4
URL for translating measures on multiple routes.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRSServer/networkLayers/0/translate?f=json&locations=[{"routeId":"I90","measure":25.0},{"routeId":"US20","measure":72.6}]&targetNetworkLayerIds=[4]Example 5
URL for translating multiple measures and measure ranges.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRSServer/networkLayers/0/translate?f=json&locations=[{"routeId":"I90","fromMeasure":25.1,"toMeasure":26.8},{"routeId":"US20","measure":72.6}]&targetNetworkLayerIds=[2,5]JSON response syntax
{
  "locations": [
    {
      // source location properties for a measure range
      "routeId": "<routeId>",
      "fromMeasure": <measure>,
      "toMeasure": <measure>,
      "networkLayerIdsWithoutFullCoverage": [<layerId1>, <layerId2>, ...],  // will only show up when translating from a line network with multifield routeId.
      "translatedLocations": [
        // target network location properties
        {
          "networkLayerId": <layerId>,
          "routeId": "<routeId>",
          "fromMeasure": <measure>,
          "toMeasure": <measure>
        },
        {
          "networkLayerId": <layerId>,
          "routeId": "<routeId>",
          "fromMeasure": <measure>,
          "toMeasure": <measure>
        },
        ...
      ]
    },
    {
      // source location properties for a single measure
      "routeId": "<routeId>",
      "measure": <measure>,
      "translatedLocations": [
        // target network location properties
        {
          "networkLayerId": <layerId>,
          "routeId": "<routeId>",
          "measure": <measure>
        },
        {
          "networkLayerId": <layerId>,
          "routeId": "<routeId>",
          "measure": <measure>
        },
        ...
      ]
    },
    ...
  ]
}JSON response example
{
  "locations": [
    {
      "routeId": "US101",
      "measure": 10,
      "translatedLocations": [
        {
          "networkLayerId": 4,
          "routeId": "9002451556",
          "measure": 4592.22
        }
      ]
    },
    {
      "routeId": "I90",
      "fromMeasure": 0,
      "toMeasure": 5,
      "networkLayerIdsWithoutFullCoverage": [5],
      "translatedLocations": [
        {
          "networkLayerId": 4,
          "routeId": "9006322627",
          "fromMeasure": 392.562,
          "toMeasure": 1034.81
        },
        {
          "networkLayerId": 7,
          "routeId": "A10004579",
          "fromMeasure": 0.5,
          "toMeasure": 1.76
        },
        {
          "networkLayerId": 7,
          "routeId": "A10004580",
          "fromMeasure": 1.76,
          "toMeasure": 5
        }
      ]
    }
  ]
}