1. Select an operation
The first step is to determine which request to use from the elevation service/at-point to find the elevation of a single point or /at-many-points to find the elevation of multiple points.
GET https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1/elevation/at-point2. Define input parameters
The next step is to provide input parameters for the operation. For the multiple points operation, you are required to provide a request body. Both single point and multiple points operations require latitude and longitude coordinates of the location(s) of interest. You can also specify the datum
The following parameters are used to get an elevation value of a single coordinate:
| Name | Description | Examples |
|---|---|---|
lon | The longitude of the specified point. | lon=-157.7079 |
lat | The latitude of the specified point. | lat=21.4040 |
relative | The datum | relative (default value), relative |
3. Make a request
The final step is to make a request to the elevation service
- Reference the service endpoint.
- Set the coordinates.
- Set your access token
An access token is an authorization string that provides access to secure ArcGIS content, data, and services. Its capabilities are determined by the privileges it supports. It is obtained by implementing API key authentication, User authentication, or App authentication. .
APIs
async function getElevationData(lon, lat) {
const url =
"https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1/elevation/at-point";
const response = await esriRequest(url, {
query: {
lon: lon,
lat: lat,
},
responseType: "json",
});
const { x, y, z } = response.data.result.point;
arcgisMap.popup = {
visibleElements: {
collapseButton: false,
closeButton: false,
actionBar: false,
},
};
const title = `Elevation relative to mean sea level`;
const content = `
Latitude: ${y.toFixed(5)}<br>
Longitude: ${x.toFixed(5)}<br>
Elevation: ${z} m`;
addPointToMap(lon, lat);
arcgisMap.openPopup({
location: [lon, lat],
content: content,
title: title,
});
}
REST API
# You can also use wget
curl -X GET https://elevation-api.arcgis.com/arcgis/rest/services/elevation-service/v1/elevation/at-point?lon=-179.99&lat=-85.05 \
-d "f=json" \
-d "token=<YOUR_ACCESS_TOKEN>"Additional resources
Tutorials

Find the elevation of a point
Find elevation value of a single location on land or water.

Find the elevations of multiple points
Find elevation values of multiple locations on land or water.