Translate

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

ParameterDetails

f

(Optional)

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

Values: html | json | pjson

locations

(Required)

A list of routes and measure values to translate.

Syntax:

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

targetNetworkLayerIds

(Required)

A comma-separated list of layer IDs into which the network layers translate.

Example:

1
targetNetworkLayerIds=[4,7]

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:

1
temporalViewDate=<timeInstant>

Example:

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

gdbVersion

(Optional)

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

Syntax:

1
gdbVersion=<version>

Example:

1
gdbVersion="user1.version1"

Example usage

The following examples demonstrate measure translation.

Example 1

URL for translating the entire measure span of a route.

1
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.

1
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.

1
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.

1
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.

1
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

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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  "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

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
34
35
36
37
38
39
40
41
{
  "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
        }
      ]
    }
  ]
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close