ArcGIS REST API

Translate

Description

License:

The ArcGIS Pipeline Referencing for Server extension is required to use this resource.

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

Description: The response format. The default response format is html.

Values: html | json

locations

Required

Description: A list of routes and measure values to translate.

Syntax:

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

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

Example: targetNetworkLayerIds=[4,7]

temporalViewDate

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

gdbVersion

Description: The geodatabase version to use for the network feature class. This parameter applies only if the isDataVersioned property of the network layer is true.

If this parameter is not specified, the published map's version is used.

Syntax: gdbVersion=<version>

Example Usage

Example 1

URL for translating the entire measure span of a route.

http://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.

http://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.

http://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.

http://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.

http://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>,
      "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,
      "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
        }
      ]
    }
}