SRTM.Client (SRTM v0.5.2) View Source
This module holds the client for querying elevation data.
Link to this section Summary
Functions
Creates a client struct that holds configuration and parsed HGT files.
Removes parsed HGT files from the in-memory cache.
Link to this section Types
Specs
t()
Link to this section Functions
Specs
new(path :: Path.t(), opts :: list()) :: {: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:
Examples
iex> {:ok, client} = SRTM.Client.new("./cache")
{:ok, %SRTM.Client{}}
Specs
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{}}