Returns elevations for up to 100 input coordinates.
Returns elevations in meters at given longitudes and latitudes within the WGS84 coordinate system.
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.
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 is a JSON structure which captures all of the following parameters for fetching elevations for multiple coordinates.
coordinates
- (Required) Array of (longitude, latitude) pairs in the WGS84 spatial reference. Maximum size of 100 coordinates.
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
]
]
]
}
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.
{
"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. | 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. | ||
| 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). | |
|
| 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). |