This library defines a pluggable, STAC-compliant, service for searching geospatial assets, primarily remotely sensed imagery, and serves two primary purposes:
- Define a pluggable driver interface (similar to GraphQL resolvers) for wrapping the STAC spec around legacy datasources.
- Provide a framework for loading / executing drivers both locally and in the cloud.
Each driver translates the STAC-compliant request into a format compatible with the underlying API while translating the API response to a valid STAC Item. Drivers are packaged and deployed to AWS Lambda and a single API Gateway endpoint is created which allows searching the loaded datasources. The goal is to create an extensible service which allows users to integrate their datasets with the STAC ecosystem without having to change how their data is stored and queried.
git clone https://github.com/geospatial-jeff/cognition-datasources cd cognition-datasources python setup.py develop
# Load datasources cognition-datasources -d Landsat8 -d Sentinel2 -d SRTM -d NAIP # Build docker container docker build . -t cognition-datasources:latest # Package service docker run --rm -v $PWD:/home/cognition-datasources -it cognition-datasources:latest package-service.sh # Deploy to AWS sls deploy -v
Read the deployment docs for more information on deployment.
The deployment generates an AWS API Gateway endpoint which supports STAC-compliant searches of the loaded datasources through the
/stac/search endpoint (POST). Read the API docs for usage details.
A live example lives here.
Check out the contributing docs for step-by-step guide for building your own driver.
Supported Datasource Drivers
|DGOpenData||Digital Globe Open Data Program||False||Builds index with a web scraper.|
|ElevationTiles||AWS Earth: Terrain Tiles||False||Sends header requests to AWS S3 Bucket.|
|CBERS||AWS Earth: CBERS||False||Sends requests to AWS S3 Bucket (RequesterPays) with help of aws-sat-api.|
|Landsat8||AWS Earth: Landsat8||True||Sends requests to sat-api.|
|NAIP||AWS Earth: NAIP||False||Sends requests to AWS S3 Bucket (RequesterPays).|
|PlanetData||Planet Data API||False||Sends request to the Planet Python Client|
|Sentinel1||Copernicus Open Access Hub||False||Sends requests to CopernicusAPIHub with help of sentinelsat.|
|Sentinel2||AWS Earth: Sentinel2||True||Sends requests to sat-api.|
|SRTM||AWS: Terrain Tiles||False||Does not send any requests.|
|USGS 3DEP||AWS: USGS 3DEP||False||Sends request to AWS S3 Bucket.|
|Microsoft Building Footprints||Microsoft / ESRI||False||Sends requests to ESRI Feature Layer|