SRTM v0.1.2 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 opaque
t()
View Source
(opaque)
t()
View Source
(opaque)
t()
t()
Link to this section Functions
Link to this function
new(path, opts \\ [])
View Source
new(path, opts \\ [])
View Source
new(path :: Path.t(), opts :: list()) ::
{:ok, t()} | {:error, error :: SRTM.Error.t()}
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:
:source
- a SRTM source provifder (defaults to USGS)
Examples
iex> SRTM.Client.new("./cache")
{:ok, %SRTM.Client{}}
Link to this function
purge_in_memory_cache(client, opts \\ []) View Source
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> SRTM.Client.purge_in_memory_cache(client, keep: 1)
{:ok, %SRTM.Client{}}