Create a full Earth Observation API with Metadata, Raster and Vector services.
Documentation: https://developmentseed.org/eoAPI/
Source Code: https://github.com/developmentseed/eoAPI
The objective of eoAPI
is to combine state of the art project to create a full Earth Observation API for Metadata search (STAC), Raster and Feature/Vector services:
-
pgSTAC database https://github.com/stac-utils/pgstac
-
STAC API built on top of https://github.com/stac-utils/stac-fastapi
-
STAC Items And Mosaic Raster Tiles API built on top of https://github.com/stac-utils/titiler-pgstac
-
OGC Features and Vector Tiles API built on top of https://github.com/developmentseed/tipg
Note: Each service can be used/deployed independently but eoAPI also adds interconnection between them.
A custom version of stac-fastapi.pgstac application, adding a TiTilerExtension
and a simple Search Viewer
.
-
Full stac-fastapi implementation
-
Simple STAC Search viewer
-
Proxy to the Tiler endpoint for STAC Items
When
TITILER_ENDPOINT
environement is set (pointing theraster
application), additional endpoints will be added to the stac-fastapi application (see: stac/extension.py):/collections/{collectionId}/items/{itemId}/tilejson.json
: Return theraster
tilejson for an item/collections/{collectionId}/items/{itemId}/viewer
: Redirect to theraster
viewer
STAC Search viewer
Code: /runtime/eoapi/stac
The dynamic tiler deployed within eoAPI is built on top of titiler-pgstac and pgstac. It enables large scale mosaic based on results of STAC searches queries:
- Full titiler-pgstac implementation
TiTiler-PgSTAC workflow
Code: /runtime/eoapi/raster
OGC Features + Tiles API built on top of tipg.
By default, the API will look for tables in the public
schema of the database. We've also added three custom functions which connect to the pgSTAC schema:
- pg_temp.pgstac_collections_view: Simple function which return PgSTAC Collections
- pg_temp.pgstac_hash: Return features for a specific searchId (hash)
- pg_temp.pgstac_hash_count: Return the number of items per geometry for a specific searchId (hash)
Code: /runtime/eoapi/vector
├──demo/ - items/collections and notebook
├──infrastructure/ - Deployment options (e.g AWS CDK application)
└──runtime/eoapi/
├── raster/ - "eoapi.raster" python package
├── stac/ - "eoapi.stac" python package
└── vector/ - "eoapi.vector" (OGC features + OGC tiles) python package
You can launch the APIs locally using docker. This will start 3 services: database, eoapi.stac, eoapi.raster
git clone https://github.com/developmentseed/eoAPI.git
cd eoAPI
docker-compose build
docker-compose up stac raster
Or install everything locally
python -m pip install --upgrade virtualenv
virtualenv .venv
source .venv/bin/activate
python -m pip install "psycopg[binary,pool]" uvicorn
python -m pip install runtime/eoapi/raster runtime/eoapi/stac runtime/eoapi/vector
export DATABASE_URL=postgresql://username:[email protected]:5439/postgis # Connect to the database of your choice
# OGC Features/Tiles
.venv/bin/uvicorn eoapi.vector.app:app --port 8000 --reload
# Raster
.venv/bin/uvicorn eoapi.raster.app:app --port 8000 --reload
# STAC
.venv/bin/uvicorn eoapi.stac.app:app --port 8000 --reload
See DEPLOYMENT.md
See CONTRIBUTING.md
See LICENSE
Created by Development Seed
See contributors for a listing of individual contributors.
See CHANGES.md.