Introduction to elevation

To find the elevation of a point, you use the Elevation service. The Elevation service is a location service that returns elevation values for a single location or multiple locations. Elevation coverage is provided for both topography (land elevations) and bathymetry (water depths) and takes location inputs as longitude and latitude coordinates. All elevation values will be returned in meters as measures of ellipsoidal height above ground level or orthometric height above mean sea level.

You can build applications that use the service to:

  • Determine the height of a specific location above mean sea level or ground level.
  • Measure the depth of a water body at a specific location.
  • Compare the relative elevation of different points to determine slope.
  • Plan flight paths by assessing elevation changes along a route.
  • Create elevation profiles of trails or roads.

How to access the geocoding service

To access the service with ArcGIS REST JS, you typically perform the following steps:

  1. Reference the appropriate package.
  2. Set the API key to authenticate the request.
  3. Define parameters to pass to the service.
  4. Call the service and handle the results.

Example

Find the elevation of a point

In this example, you use the findElevationAtPoint operation retrieve the elevation of a location with a longitude of -179.99 and a latitude of -85.05.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
import { findElevationAtPoint } from "@esri/arcgis-rest-elevation";
import { ApiKeyManager } from "@esri/arcgis-rest-request";

const results = await findElevationAtPoint({
  lon: -179.99,
  lat: -85.05,
  authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
});

console.log(results)

Find the elevations of multiple points

In this example, you use the findElevationAtManyPoints operation retrieve the elevation values for multiple coordinates at once.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
import { findElevationAtManyPoints } from "@esri/arcgis-rest-elevation";
import { ApiKeyManager } from "@esri/arcgis-rest-request";

const results = await findElevationAtManyPoints({
  coordinates: [[31.134167, 29.979167], [31.130833, 29.976111], [31.128333, 29.9725]],
  authentication: ApiKeyManager.fromKey("YOUR_ACCESS_TOKEN");
});

console.log(results)

Tutorials

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