Returns elevations for up to 100 input coordinates.
Returns elevations in meters at given longitudes and latitudes within the WGS84 coordinate system.
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
.
The following parameters are used to fetch elevations for multiple coordinates:
coordinates
- (Required) 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
- longitude in the range
- For example:
[[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]]
f
- (Optional) Case-sensitive parameter to specify the format in which responses are given. Can either be
json
orpjson
.
relativeTo
-
(Optional) 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.
token
- (Optional) The authentication token, used to access the elevation service. Alternatively, you can supply a token in the request header with either the
Authorization
orX-
key, using the "Bearer" scheme.Esri- Authorization
Body parameter
{
"token": "My token",
"relativeTo": "meanSeaLevel",
"f": "json",
"coordinates": [
[
31.134167,
29.979167
],
[
31.130833,
29.976111
],
[
31.128333,
29.9725
]
]
}
token: My token
relativeTo: meanSeaLevel
f: json
coordinates:
- - 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/beta/elevation/at-many-points \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
Response
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.
{
"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
}
]
}
}
{
"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
}
]
}
}
400 Response
{
"error": {
"code": 400,
"message": "string",
"details": [
"string"
],
"restInfoUrl": "https://elevation-api.arcgis.com/arcgis/rest/info"
}
}
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). |