Home

Awesome

sat-api

CircleCI

Sat-api is a STAC compliant web API for searching and serving metadata for geospatial data (including but not limited to satellite imagery).

Development Seed runs an instance of sat-api for the Landsat-8 and Sentinel-2 imagery that is hosted on AWS. You can access this at https://sat-api.developmentseed.org using the API documentation for reference and examples.

The STAC version supported by a given version of sat-api is shown in the table below. Additional information can be found in the CHANGELOG

sat-apiSTAC
0.1.00.5.x
0.2.x0.6.x
0.3.x0.7.x

Usage

This repository contains just the Node libraries for running the API. The sat-api-deployment repository is for deploying sat-api to AWS.

Environment variables

There are some environment variables used in the code. Some do not have defaults and must be set.

NameDescriptionDefault Value
STAC_IDID of this catalog-
STAC_TITLETitle of this catalog-
STAC_DESCRIPTIONDescription of this catalog-
STAC_DOCS_URLURL to documentation-
SATAPI_URLThe root endpoint of this API to use for linksInferred from request
ES_BATCH_SIZENumber of records to ingest in single batch500
SATAPI_ES_PRECISIONPrecision to use for geometry queries, see ES documentation'5mi'
LOG_LEVELLevel for logging'info'

Development

Sat-api includes a number of NPM packages (in the packages/ directory) that are used to create and populate an instance of sat-api. See the sat-utils org on NPM for the full list of packages. Lerna is used for for managing these packages.

The latest version released is on the master branch, and the latest development version is on the develop branch.

Building local version

# Install dependencies in package.json
$ yarn

# Run lerna boostrap to link together packages and install those package dependencies
$ yarn bootstrap

# Run the build command in each of the packages (runs webpack)
$ yarn build

# To continually watch and build source files
$ yarn watch

# To run tests for all packages
$ yarn test

Building API docs

# To build API docs from the api spec
$ yarn build-api-docs

Creating a release

To create a new version for npm:

About

sat-api was created by Development Seed and is part of a collection of tools called sat-utils.