- URL:
 - https://<network-layer-url>/measureToGeometry
 - Methods:
 GET- Required Capability:
 - The ArcGIS Location Referencing license is required to use this resource.
 - Version Introduced:
 - 10.6
 
Description
This operation converts one or more measure values into geographic locations along a set of routes.
If the measures cannot be converted to a valid geometry (point or line), a status message is returned with the reason the conversion failed.
Status messages
The following table contains an enumeration of the possible locating statuses:
| Status | Description | 
|---|---|
| 
 
  | 
 Locating was successful.  | 
| 
 
  | 
 The route location's route ID is invalid (null, empty, or invalid value).  | 
| 
 
  | At least one of the route location's measure values is invalid.  | 
| 
 
  | 
 The route does not exist.  | 
| 
 
  | 
 The route does not have a shape or the shape is empty.  | 
| 
 
  | 
 The route does not have measures or the measures are null.  | 
| 
 
  | 
 The route is not an m-aware polyline.  | 
  | The from measure is equal to the to measure.  | 
| 
 
  | 
 The route location's shape cannot be found because the route has no measures or the route location's measures do not exist on the route.  | 
| 
 
  | 
 The route location's shape cannot be found because the from station and the to station are outside of the route measures.  | 
| 
 
  | The entire route location's shape could not be found; the from measure is outside of the route measure range.  | 
| 
 
  | The entire route location's shape could not be found; the to measure is outside of the route measure range.  | 
| 
 
  | 
 The route location's shape cannot be found because the to station is outside of the route measure range.  | 
  | The route's line ID is invalid (null, empty, or invalid value).  | 
  | The route's line order is invalid (null, empty, or invalid value).  | 
  | The from route and to route have different line IDs.  | 
Request parameters
| Parameter | Details | 
|---|---|
 (Optional)  | 
 Specifies the response format. The default response format is  Values:   | 
 (Required)  | A list of routes and point locations to convert to geometry. Syntax:  | 
  | 
 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:  | 
  | 
 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   | 
 (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 conversion from measure to geometry.
Example 1
URL for converting a single measure to point geometry
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/measureToGeometry?f=json&locations=[{"routeId":"I90","measure":25}]&outSR=102100Example 2
URL for converting a measure range to line geometry
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/measureToGeometry?f=json&locations=[{"routeId":"I90","fromMeasure":25.1,"toMeasure":26.8}]&outSR=102100Example 3
URL for converting multiple measures to point geometry
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/measureToGeometry?f=json&locations=[{"routeId":"I90","measure":25.0},{"routeId":"US20","measure":72.6}]&outSR=102100Example 4
URL for converting multiple measures and measure ranges to point and line geometry
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/0/measureToGeometry?f=json&locations=[{"routeId":"I90","fromMeasure":25.1,"toMeasure":26.8},{"routeId":"US20","measure":72.6}]&outSR=102100JSON response syntax
{
  "spatialReference": <>,
  "locations": [
    {
      "status": "<status1>",
      "routeId": "<routeId1>",
      "geometryType": "<geometryType1>",  // one of: esriGeometryPoint, esriGeometryPolyline
      "geometry": { "x": <x>, "y": <y> }  // syntax for point geometry
    },
    {
      "status": "<status2>",
      "routeId": "<routeId2>",
      "geometryType": "<geometryType2>",
      "geometry": { "paths": [ [ [<x1>,<y1>], [<x2>,<y2>], ... ] ] }  // syntax for line geometry
    },
    {
      "status": "<status3>",
      "routeId": "<routeId3a>",
      "toRouteId": "<routeId3b>",
      "geometryType": "<geometryType3>",
      "geometry": { "paths": [ [ [<x1>,<y1>], [<x2>,<y2>], ... ] ] }  // syntax for line geometry that spans multiple routes
    },
    ...
  ]
}JSON response example
{
  "spatialReference": { "wkid": 102100 },
  "locations": [
    {
      "status": "esriLocatingOK",
      "routeId": "I90",
      "geometryType": "esriGeometryPoint",
      "geometry": { "x": -8479118.349, "y": 5326520.134 }
    }
  ]
}