-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9758ce4
commit 93eb17a
Showing
9 changed files
with
249 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
|
||
The eoAPI repository (https://github.com/developmentseed/eoAPI) hosts customized version of each base services. This is to show how each services can be customized and how they can work in parallel or with each other. | ||
|
||
--- | ||
## eoapi.stac | ||
|
||
Built on [stac-fastapi.pgstac](https://github.com/stac-utils/stac-fastapi) application, adding a **`TiTilerExtension`** and a simple **`Search Viewer`**. | ||
|
||
The service includes: | ||
|
||
- Full **stac-fastapi** implementation - see [docs](http://localhost:8081/docs) if using the `docker-compose` configuration. | ||
- Simple STAC Search **viewer** - see [viewer](http://localhost:8081/index.html) if using the `docker-compose` configuration. | ||
- **Proxy** to the tiler endpoint for STAC Items. | ||
|
||
When the `TITILER_ENDPOINT` environment variable is set (pointing to the `raster` application), additional endpoints will be added to the stac-fastapi application (see: [stac/extension.py](https://github.com/developmentseed/eoAPI/blob/main/src/eoapi/stac/eoapi/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 | ||
|
||
<p align="center"> | ||
<img alt="eoapi.stac OpenAPI documentation"src="https://github.com/developmentseed/eoAPI/assets/10407788/f7fc4e7f-079a-4007-8c4c-74ff9ca7b012"> | ||
<img alt="Metadata STAC search viewer" src="https://github.com/developmentseed/eoAPI/assets/10407788/b1fd6aa8-aab9-4d58-9ad4-6e1069ed9473"/> | ||
</p> | ||
|
||
Code: [/runtime/eoapi/stac](https://github.com/developmentseed/eoAPI/tree/main/runtime/eoapi/stac) | ||
|
||
--- | ||
## eoapi.raster | ||
|
||
The dynamic tiler deployed within `eoAPI` is built on top of [titiler-pgstac](https://github.com/stac-utils/titiler-pgstac) and [pgstac](https://github.com/stac-utils/pgstac). It enables large-scale mosaic based on the results of STAC search queries. | ||
|
||
The service includes all the default endpoints from **titiler-pgstac** application and: | ||
|
||
- `/`: a custom landing page with links to the different endpoints | ||
|
||
- `/mosaic/builder`: a virtual mosaic builder UI, which help creating and registering STAC Search queries | ||
|
||
- `/collections`: a *secret* (not in OpenAPI documentation) endpoint used in the mosaic-builder page | ||
|
||
- `/collections/{collection_id}/items/{item_id}/viewer`: a simple STAC Item viewer | ||
|
||
<p align="center"> | ||
<img alt="eoapi.stac OpenAPI documentation" src="https://github.com/developmentseed/eoAPI/assets/10407788/aa08d796-f3b1-4f43-8021-cbddfff95d26"> | ||
<img alt="Raster mosaic builder" src="https://github.com/developmentseed/eoAPI/assets/10407788/8f0c96e6-d80a-46ef-a34f-66e59c64a027"/> | ||
<img alt="STAC Item viewer" src="https://github.com/developmentseed/eoAPI/assets/10407788/be86f07e-4b05-4c78-87bf-8738daf1ee20"> | ||
</p> | ||
|
||
|
||
Code: [/runtime/eoapi/raster](https://github.com/developmentseed/eoAPI/tree/main/runtime/eoapi/raster) | ||
|
||
--- | ||
## eoapi.vector | ||
|
||
OGC Features and Tiles API built on top of [tipg](https://github.com/developmentseed/tipg). | ||
|
||
By default, the API will look for tables in the `public` schema of the database. We've also added three functions that connect to the pgSTAC schema: | ||
|
||
- **pg_temp.pgstac_collections_view**: Simple function which returns 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) | ||
|
||
<p align="center"> | ||
<img alt="eoapi.vector OpenAPI documentation" src="https://github.com/developmentseed/eoAPI/assets/10407788/80ff9659-bc07-4238-a94a-7cab0a2af380"> | ||
<img alt="eoapi.vector landing page" src="https://github.com/developmentseed/eoAPI/assets/10407788/b2a8a8d4-d3a1-464a-8b1a-166499ee4abd"> | ||
</p> | ||
|
||
Code: [/runtime/eoapi/vector](https://github.com/developmentseed/eoAPI/tree/main/runtime/eoapi/vector) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
--- | ||
hide: | ||
- navigation | ||
--- | ||
|
||
|
||
<p align="center"> | ||
<img width="700" src="../img/eoAPI.png"/> | ||
|
@@ -67,11 +62,25 @@ See [service details](./services.md) for more information. | |
|
||
## Getting started | ||
|
||
- Clone the repository: `git clone https://github.com/developmentseed/eoAPI.git` | ||
- Navigate to the project: `cd eoAPI` | ||
- Run services with `docker compose up` | ||
- Follow the [MAXAR open data demo](https://github.com/vincentsarago/MAXAR_opendata_to_pgstac) (or get inspired by the other [demos](https://github.com/developmentseed/eoAPI/tree/main/demo)) to load some data into eoAPI | ||
- Checkout the [Search Viewer](http://localhost:8081/index.html), and the API documentation ([STAC Metadata](http://localhost:8081/docs), [Raster Tiles](http://localhost:8082/docs), [Vector Tiles](http://localhost:8083/api.html)) | ||
The easiest way to start exploring the different eoAPI services is with *Docker*. Clone this repository and start the multi-container *Docker* applications using `Compose`: | ||
|
||
``` | ||
git clone https://github.com/developmentseed/eoAPI.git | ||
cd eoAPI | ||
docker compose up | ||
``` | ||
|
||
Once the application are *up*, you'll need to add STAC **Collections** and **Items** to the PgSTAC database. If you don't have, you can use the follow the [MAXAR open data demo](https://github.com/vincentsarago/MAXAR_opendata_to_pgstac) (or get inspired by the other [demos](https://github.com/developmentseed/eoAPI/tree/main/demo)). | ||
|
||
|
||
Then you can start exploring your dataset with: | ||
|
||
- the STAC Metadata service [http://localhost:8081](http://localhost:8081) | ||
- the Raster service [http://localhost:8082](http://localhost:8082) | ||
|
||
!!! info | ||
|
||
If you've added vector dataset to the `public` schema in the Postgres database, they will be available through the **Vector** service at [http://localhost:8083](http://localhost:8083). | ||
|
||
Alternatively, you may launch the application locally: | ||
```bash | ||
|
@@ -87,5 +96,7 @@ export DATABASE_URL=postgresql://username:[email protected]:5439/postgis # Conne | |
.venv/bin/uvicorn eoapi.{SERVICE}.app:app --port 8000 --reload | ||
``` | ||
|
||
Note: services might have incompatible dependencies which you can resolve by using virtual environement per service | ||
!!! danger | ||
|
||
Python applications might have incompatible dependencies which you can resolve by using virtual environment *per application* | ||
|
Oops, something went wrong.