Documentation
¶
Overview ¶
Package earthsearch is the library behind the earthsearch command line: the HTTP client, wire types, and typed data models for the AWS Earth Search STAC API (SpatioTemporal Asset Catalog).
Index ¶
- Constants
- type Client
- func (c *Client) ListCollections(ctx context.Context) ([]*Collection, error)
- func (c *Client) ListCollectionsAt(ctx context.Context, baseURL string) ([]*Collection, error)
- func (c *Client) SearchItems(ctx context.Context, collections []string, limit int, nextToken string) ([]*Item, int, string, error)
- func (c *Client) SearchItemsAt(ctx context.Context, baseURL string, collections []string, limit int, ...) ([]*Item, int, string, error)
- type Collection
- type Config
- type Domain
- type Item
Constants ¶
const BaseURL = "https://earth-search.aws.element84.com/v1"
const Host = "earth-search.aws.element84.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to the Earth Search STAC API.
func NewClientAt ¶
NewClientAt returns a Client targeting a custom base URL (useful in tests).
func (*Client) ListCollections ¶
func (c *Client) ListCollections(ctx context.Context) ([]*Collection, error)
ListCollections returns all available satellite imagery collections.
func (*Client) ListCollectionsAt ¶
ListCollectionsAt is like ListCollections but targets a custom base URL (useful in tests).
type Collection ¶
type Collection struct {
ID string `json:"id" kit:"id"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
}
Collection is a named group of satellite imagery scenes.
type Config ¶
type Config struct {
BaseURL string
Rate time.Duration
Retries int
Timeout time.Duration
UserAgent string
}
Config holds tunable knobs for a Client.
type Domain ¶
type Domain struct{}
Domain is the earthsearch driver for the AWS Earth Search STAC API.
func (Domain) Info ¶
func (Domain) Info() kit.DomainInfo
type Item ¶
type Item struct {
ID string `json:"id" kit:"id"`
Collection string `json:"collection,omitempty"`
DateTime string `json:"datetime,omitempty"`
Platform string `json:"platform,omitempty"`
Constellation string `json:"constellation,omitempty"`
CloudCover float64 `json:"cloud_cover,omitempty"`
BBoxMinLon float64 `json:"bbox_min_lon,omitempty"`
BBoxMinLat float64 `json:"bbox_min_lat,omitempty"`
BBoxMaxLon float64 `json:"bbox_max_lon,omitempty"`
BBoxMaxLat float64 `json:"bbox_max_lat,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
}
Item is a single STAC item (satellite imagery scene).