View Source SRTM (SRTM v0.8.0)

A simple interface to query locations on the Earth for elevation data from the NASA Shuttle Radar Topography Mission (SRTM).

Summary

Types

Elevation (in meters)

A geographic coordinate that specifies the north–south position of a point on the surface of the Earth.

A geographic coordinate that specifies the east–west position of a point on the surface of the Earth.

Functions

Queries locations on the earth for elevation data.

Types

@type elevation() :: integer()

Elevation (in meters)

@type latitude() :: number()

A geographic coordinate that specifies the north–south position of a point on the surface of the Earth.

@type longitude() :: number()

A geographic coordinate that specifies the east–west position of a point on the surface of the Earth.

Functions

Link to this function

get_elevation(latitude, longitude, opts \\ [])

View Source
@spec get_elevation(latitude(), longitude(), keyword()) ::
  {:ok, elevation() | nil} | {:error, SRTM.Error.t()}

Queries locations on the earth for elevation data.

If the corresponding file can't be found in the cache, it will be retrieved online.

Returns the elevation in meters.

Examples

iex> SRTM.get_elevation(36.455556, -116.866667)
{:ok, -51}}

Configuration