/elevation/at-many-points

POST
Use dark colors for code blocksCopy
1
https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1/elevation/at-many-points

Returns elevations for up to 100 input coordinates.

Returns elevations in meters at given longitudes and latitudes within the WGS84 coordinate system.

The following parameters are used to fetch elevations for multiple coordinates:

  • coordinates
  • relativeTo
  • token
  • f

The order of the points returned by this request will be the same as the order of the points passed in the coordinates parameter.

If the distance between the furthest West and furthest East coordinate exceeds 50km, the service will return a 400 HTTP response as the distance between these points is too large.

If the distance between the furthest North and furthest South coordinate exceeds 50km, the service will return a 400 HTTP response as the distance between these points is too large.

If any of the points are otherwise invalid, a 400 HTTP response will be returned.

By default the elevation is measured with respect to the Earth's mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.

If the relativeTo parameter in the body is set to ellipsoid, the elevation will be measured with respect to the ellipsoid. This is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.

Note: You cannot permanently store elevations. Please see the Terms of use.

The Post Body content type must be either:

  • JSON with content type of application/json, or
  • form URL encoded key-value pairs with content type application/x-www-form-urlencoded.

Body parameters

Supported content types: application/json, application/x-www-form-urlencoded

NameTypeRequiredDefault valueDescription

The authentication token, used to access the elevation service.

meanSeaLevel

The reference position (datum) from which to measure elevation.

Optional, case-sensitive parameter to specify the format in which responses are given. Can either be json or pjson.

[array]

Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates.

token

The authentication token, used to access the elevation service.

The token parameter can be either an API Key or short-lived token.

This parameter is required unless you supply an access token in the request header with one of the following keys using the "Bearer" scheme:

  • Authorization: Bearer <YOUR_TOKEN>
  • X-Esri-Authorization: Bearer <YOUR_TOKEN>

The provided token must be created from an ArcGIS Location Platform account and have the necessary premium:user:elevation privilege to use the elevation service.

Developer guide: To learn more, go to Security and authentication.

relativeTo

The reference position (datum) from which to measure elevation.

The valid values are:

  • meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
  • ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.
Default
meanSeaLevel
Enumerated values
meanSeaLevel
Click to copy
ellipsoid
Click to copy

f

Optional, case-sensitive parameter to specify the format in which responses are given. Can either be json or pjson.

Enumerated values
json
Click to copy
pjson
Click to copy

coordinates

Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates.

The order of each pair must be::

  • longitude in the range -179.99 to 179.99 representing the east/west or x-axis
  • latitude in the range -85.05 to 85.05 representing the north/south or y-axis

For example: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]

Examples

Request

Use dark colors for code blocksCopy
1
2
3
4
5
6
# You can also use wget
curl -X POST https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1/elevation/at-many-points \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  --data '{"token":"MyToken","relativeTo":"meanSeaLevel","f":"json","coordinates":[[31.134167,29.979167],[31.130833,29.976111],[31.128333,29.9725]]}'

Response

Pyramids of Giza relative to mean sea level

Use dark colors for code blocksCopy
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
{
  "elevationInfo": {
    "relativeTo": "meanSeaLevel"
  },
  "result": {
    "points": [
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 31.134167,
        "y": 29.979167,
        "z": 82
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 31.130833,
        "y": 29.976111,
        "z": 90
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 31.128333,
        "y": 29.9725,
        "z": 74
      }
    ]
  }
}

Great Wall of China relative to ellipsoid

Use dark colors for code blocksCopy
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
48
49
50
51
52
53
54
55
56
57
{
  "elevationInfo": {
    "relativeTo": "ellipsoid"
  },
  "result": {
    "points": [
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 116.5655434,
        "y": 40.4334671,
        "z": 483
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 116.5642703,
        "y": 40.4331226,
        "z": 502
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 116.5646503,
        "y": 40.4378045,
        "z": 452
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 116.5650703,
        "y": 40.4404094,
        "z": 482
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 116.5642957,
        "y": 40.4408222,
        "z": 495
      },
      {
        "spatialReference": {
          "wkid": 4326
        },
        "x": 116.5697131,
        "y": 40.4324535,
        "z": 437
      }
    ]
  }
}
StatusMeaningDescriptionSchema

200

OK

Response to a request for the elevations at specified points. There will be one response point for each point in the request. The order of these points will match the order of the points in the request.

Inline

400

Bad Request

Invalid query parameters / Incorrect portal item type.

Error

401

Unauthorized

Authentication Error. The API key or token is missing, invalid or expired.

Error

403

Forbidden

The requested resource cannot be accessed because of incorrect sharing permissions.

Error

413

Payload Too Large

The request body was larger than limits defined by the service.

Error

415

Unsupported Media Type

The request's message content is of a media-type that the service does not support.

Error

5XX

Unknown

An error occurred on the server.

Error

Response details

Status Code 200

NameTypeRequiredRestrictionsDescription

elevationInfo

none

A structure containing human readable metadata about the specified point.

relativeTo

string

none

The reference position (datum) from which to measure elevation. The valid values are:

  • meanSeaLevel: The elevation above or below the WGS84 geoid reference surface, which is approximately the mean sea level. It takes into account the local variations in gravity and provides a consistent vertical reference.
  • ellipsoid: Ellipsoidal height is measured with respect to an ellipsoid, which is a mathematical model that approximates the shape of the Earth. It does not consider local variations in gravity and is commonly used in GPS positioning.

result

none

A structure containing a collection of points which contain elevation values (defined as Z). When returned from a request to the /elevation/at-many-points endpoint, the order of the points will match the order of the points in the request.

points

none

A geometry point referring to a location on a map.

spatialReference

object

none

The spatial reference system the point is relative to.

wkid

number

none

The Well-Known ID (WKID) value of the spatial reference.

x

number

none

The X coordinate which is measured along the east/west axis.

y

number

none

The Y coordinate which is measured along the north/south axis.

z

number

none

The Z coordinate represents the vertical position of a point above or below a reference level, such as sea level (in meters, rounded to the nearest meter).

Enumerated Values

relativeTo
meanSeaLevel
Click to copy
ellipsoid
Click to copy

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