srtm

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Elevation *ElevationService
	// contains filtered or unexported fields
}

Client client

func NewClient

func NewClient(opts ...Option) (*Client, error)

NewClient creates a new client and applies all provided Options

type ElevationService

type ElevationService struct {
	// contains filtered or unexported fields
}

ElevationService is the API for querying elevations from SRTM

func (*ElevationService) Elevation

func (s *ElevationService) Elevation(ctx context.Context, point *geom.Point) (float64, error)

Elevation returns the elevation for the coordinates

func (*ElevationService) Elevations

func (s *ElevationService) Elevations(ctx context.Context, coords []*geom.Point) ([]float64, error)

Elevations returns the elevations for the coordinates

type Option

type Option func(*Client) error

Option provides a configuration mechanism for a Client

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets the underlying http client.

func WithHTTPTracing

func WithHTTPTracing(debug bool) Option

WithHTTPTracing enables tracing http calls.

func WithStorage

func WithStorage(storage geoelevations.SrtmLocalStorage) Option

WithStorage sets the cache implementation for data files

func WithStorageLocation

func WithStorageLocation(directory string) Option

WithStorageLocation uses the fully qualified directory name to store cached files

func WithTransport

func WithTransport(t http.RoundTripper) Option

WithTransport sets the underlying http client transport.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL