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
@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
:disk_cache_enabled
(boolean/0
) - whehter the disk cache is enabled.:disk_cache_path
(Path.t/0
) - the path to the directory where the downloaded HGT files are stored. Defaults to./srtm_cache
.:in_memory_cache_enabled
(boolean/0
) - whehter the in-memory cache is enabled.Note
See
SRTM.Cache.PersistentTerm
for the implications on system performance.:in_memory_cache_module
(module/0
) - A module that implements theSRTM.Cache
behaviour. Defaults toSRTM.Cache.PersistentTerm
.:sources
(list ofmodule/0
) - a list of modules that implement theSRTM.Source
behaviour. Defaults toSRTM.Source.AWS
andSRTM.Source.ESA
.