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
relative
To 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 relative
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
Name | Type | Required | Default value | Description |
---|---|---|---|---|
| The authentication token, used to access the elevation service. | |||
| 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 | |||
|
| 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
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
f
Optional, case-sensitive parameter to specify the format in which responses are given. Can either be json
or pjson
.
Enumerated values
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
to179.99
representing the east/west or x-axis - latitude in the range
-85.05
to85.05
representing the north/south or y-axis
For example: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]
Examples
Request
# 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
{
"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
{
"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
}
]
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
| 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 | |
| Invalid query parameters / Incorrect portal item type. | ||
| Authentication Error. The API key or token is missing, invalid or expired. | ||
| The requested resource cannot be accessed because of incorrect sharing permissions. | ||
| The request body was larger than limits defined by the service. | ||
| The request's message content is of a media-type that the service does not support. | ||
| Unknown | An error occurred on the server. |
Response details
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
| none | A structure containing human readable metadata about the specified point. | ||
|
| none | The reference position (datum) from which to measure elevation. The valid values are:
| |
| none | A structure containing a collection of points which contain elevation values (defined as Z). When returned from
a request to the | ||
|
| none | A geometry point referring to a location on a map. | |
|
| none | The spatial reference system the point is relative to. | |
|
| none | The Well-Known ID (WKID) value of the spatial reference. | |
|
| none | The X coordinate which is measured along the east/west axis. | |
|
| none | The Y coordinate which is measured along the north/south axis. | |
|
| 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). |