SRTM v0.5.0 SRTM.Client 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
Link to this section Functions
Link to this function
new(path, opts \\ [])
View Sourcenew(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{}}
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{}}