View Source SRTM.Client (SRTM v0.7.0)
The client for querying elevation data.
Summary
Functions
Creates a client struct that holds configuration and parsed HGT files.
Removes parsed HGT files from the in-memory cache.
Types
@opaque t()
Functions
@spec new(path :: Path.t(), opts :: Keyword.t()) :: {:ok, t()} | {:error, error :: SRTM.Error.t()}
Creates a client struct that holds configuration and parsed HGT files.
If the directory at the given path
doesn't exist, creates it.
Options
The supported options are:
:sources
(list ofmodule/0
) - the SRTM source providers (defaults toSRTM.Source.AWS
andSRTM.Source.ESA
)
Examples
iex> {:ok, client} = SRTM.Client.new("./cache")
{:ok, %SRTM.Client{}}
Removes parsed HGT files from the in-memory cache.
Options
The supported options are:
:keep
- the number of most recently used HGT files to keep (default: 0)
Examples
iex> {:ok, client} = SRTM.Client.purge_in_memory_cache(client, keep: 1)
{:ok, %SRTM.Client{}}