Skip to content

Latest commit

 

History

History
158 lines (99 loc) · 5.87 KB

README.md

File metadata and controls

158 lines (99 loc) · 5.87 KB

Create a full Earth Observation API with Metadata, Raster and Vector services.

Test Downloads


Documentation: https://developmentseed.org/eoAPI/

Source Code: https://github.com/developmentseed/eoAPI


Earth Observation API

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:

Note: Each service can be used/deployed independently but eoAPI also adds interconnection between them.


Services

STAC Metadata

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 the raster application), additional endpoints will be added to the stac-fastapi application (see: stac/extension.py):

    • /collections/{collectionId}/items/{itemId}/tilejson.json: Return the raster tilejson for an item
    • /collections/{collectionId}/items/{itemId}/viewer: Redirect to the raster viewer

STAC Search viewer

Code: /runtime/eoapi/stac


Raster Tiles

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 / Vector Tiles

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


Project structure

 ├──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

Launch application locally

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

Deployment

See DEPLOYMENT.md

Contribution & Development

See CONTRIBUTING.md

License

See LICENSE

Authors

Created by Development Seed

See contributors for a listing of individual contributors.

Changes

See CHANGES.md.