Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/maxar demo review #133

Merged
merged 3 commits into from
Aug 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 63 additions & 27 deletions docs/src/notebooks/eoAPI_Maxar_demo.ipynb
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "a0eb29a0",
"metadata": {},
"source": [
"## eoAPI Demo\n",
"# eoAPI Demo: Analyzing Maxar Data on Hawaii Wildfires\n",
"\n",
"### Background\n",
"\n",
"This notebook will review the different [eoAPI](https://github.com/developmentseed/eoAPI) services using the latest Open data from Maxar acquired during the Hawaii fires of August 2023\n",
"The Hawaii wildfires have been devastating, causing significant loss of life and property. This crisis is a stark reminder of the importance of timely and accurate data for disaster response.\n",
"\n",
"### Objective\n",
"\n",
"This notebook aims to demonstrate how [eoAPI](https://github.com/developmentseed/eoAPI) can be used to analyze Maxar's high-resolution satellite data for assessing the impact of the Hawaii wildfires of August 2023.\n",
"\n",
"### Maxar Open Data\n",
"\n",
"> Pre and post-event high-resolution satellite imagery in support of emergency planning, risk assessment, monitoring of staging areas and emergency response, damage assessment, and recovery. These images are generated using the Maxar ARD pipeline, tiled on an organized grid in analysis-ready cloud-optimized formats.\n",
"Pre and post-event high-resolution satellite imagery in support of emergency planning, risk assessment, monitoring of staging areas and emergency response, damage assessment, and recovery. These images are generated using the Maxar ARD pipeline, tiled on an organized grid in analysis-ready cloud-optimized formats.\n",
"\n",
"### STAC and COGs\n",
"\n",
"Maxar releases open data for select sudden-onset major crisis events. In addition to making the data (as nice COGs) freely available on AWS, they also add STAC (static) metadata alongside the images. Having the STAC items already created makes ingestion into the PgSTAC database easy (we don't have to produce the items ourselves and thus have to read the images).\n",
"\n",
"### STAC and COGs\n",
"To learn more about how we ingest the Maxar OpenData STAC catalog into PgSTAC see https://github.com/vincentsarago/MAXAR_opendata_to_pgstac.\n",
"\n",
"Maxar releases open data for select sudden-onset major crisis events. In addition to putting the data (as nice COGs) freely available on AWS, they are also adding STAC (static) metadata alongside the images. Having the STAC items already created makes ingestion into the PgSTAC database easy (we don't have to produce the items ourselves and thus have to read the images).\n",
"---\n",
"\n",
"To learn more about how we ingest Maxar OpenData STAC catalog into PgSTAC see https://github.com/vincentsarago/MAXAR_opendata_to_pgstac.\n"
"> 📣 **Note: Important Information**\n",
"> - **Demo Endpoints**: This notebook uses the demo endpoints [stac.eoapi.dev](https://stac.eoapi.dev) and [raster.eoapi.dev](https://raster.eoapi.dev). These are not intended for production use.\n",
"> - **Authentication**: While the demo endpoints are currently open to the public, we may introduce authentication features in the future.\n",
"> - **Set Up Your Own Services**: If you're interested in setting up your own eoAPI services, you can easily do so. For a step-by-step guide, please check out the 'Getting Started' section of the [eoAPI GitHub repository](https://github.com/developmentseed/eoAPI).\n",
"> - **Breaking changes**: DevelopmentSeed does not guarantee that these eoAPI endpoints will stay `open`, and breaking changes might be introduced anytime.\n",
"\n",
"---"
]
},
{
Expand Down Expand Up @@ -1813,16 +1826,17 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "acc2e254",
"metadata": {},
"source": [
"## Asset visualization\n",
"\n",
"We know we have 4 assets for each item, and that 3 are of `Cloud-Optimized` type. Let's use the raster API to visualize them.\n",
"We know we have 4 assets for each item, and 3 are of `Cloud-Optimized` type. Let's use the raster API to visualize them.\n",
"\n",
"\n",
"First, let's get the Raster metadata for each `raster` assets. The raster API will use the asset's `type` metadata to filter non-raster dataset (e.g. `application/geopackage+sqlite3`).\n"
"First, let's get the Raster metadata for each `raster` asset. The raster API will use the asset's `type` metadata to filter non-raster datasets (e.g. `application/geopackage+sqlite3`).\n"
]
},
{
Expand Down Expand Up @@ -3043,19 +3057,21 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "52ba019b",
"metadata": {},
"source": [
"Woot, more than 2000 items.\n",
"\n",
"Let's now register the mosaic query. \n",
"Let's now register the mosaic query.\n",
"\n",
"Note, for this we will assume:\n",
"- that `GE01` is a cross collection platform\n",
"\n",
"- that `GE01` is a cross-collection platform\n",
"- that all `GE01` items have a `visual` asset\n",
"- that all `visual` asset are 3 bands and Uint8 raster\n",
"- that all `visual` asset cover the same zoom range "
"- that all `visual` assets are 3 bands and Uint8 raster\n",
"- that all `visual` assets cover the same zoom range"
]
},
{
Expand Down Expand Up @@ -3213,7 +3229,7 @@
" zoom_start=8\n",
")\n",
"\n",
"# let's add the collections geojson on top of the map\n",
"# let's add the collection's geojson on top of the map\n",
"geo_json = GeoJson(data=collections_geojson)\n",
"geo_json.add_to(m)\n",
"\n",
Expand All @@ -3230,36 +3246,56 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "16c8665f",
"metadata": {},
"source": [
"Not all collection have `GE01` items, pan/zoom to some collection to see the tiles."
"Not all collection have GE01 items; pan/zoom to some collections to see the tiles."
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0652bbf8",
"metadata": {},
"source": [
"Note: While we showed that it is technically possible to construct Mosaics using `open` filter, this might not be really a good idea in term of performances.\n",
"\n",
"- not all the properties are indexed in PgSTAC, meaning that the `platform` properties lookup will be slow.\n",
"Note: While we showed that it is technically possible to construct Mosaics using the `open` filter, there might be better ideas in terms of performance.\n",
"\n",
"- we cannot really spatially limit the mosaic, meaning that the frontend will request tiles for the full world\n",
"\n",
"- Assuming that all `GE01` platfom have `visual` asset is a HUGE assumption\n",
"\n",
"- Assuming that all `visual` asset are the same is also bold\n"
"- Only some properties are indexed in PgSTAC, meaning the `platform` properties lookup will be slow.\n",
"- We cannot spatially limit the mosaic, meaning the frontend will request tiles for the entire world.\n",
"- Assuming that all `GE01` platforms have `visual` assets is a HUGE assumption.\n",
"- Assuming that all `visual` assets are the same is also bold."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c74df2f5",
"attachments": {},
"cell_type": "markdown",
"id": "57923484",
"metadata": {},
"outputs": [],
"source": []
"source": [
"## What's Next?\n",
"\n",
"### Spin Up Your Own eoAPI Instance\n",
"\n",
"You've seen what eoAPI can do with Maxar data in the context of the Hawaii wildfires. Interested in setting up your own eoAPI service? It's straightforward! Follow the 'Getting Started' section of the [eoAPI GitHub repository](https://github.com/developmentseed/eoAPI) to get your instance up and running. This will give you greater control and customization options.\n",
"\n",
"### Contribute Your Data\n",
"\n",
"Consider contributing if you've used Maxar data for similar analyses or have other datasets that could benefit the community. Uploading your data to your eoAPI instance can provide more diverse examples and help in various applications.\n",
"\n",
"### Community-Driven Examples\n",
"\n",
"The examples you see here, including this notebook, are often community-driven. We encourage you to contribute your analyses, workflows, or visualizations. Your insights could be invaluable for helping others.\n",
"\n",
"### Have Questions? Join the Discussion!\n",
"\n",
"If you have questions, feedback, or want to engage with the eoAPI community, please join the [GitHub discussions](https://github.com/developmentseed/eoAPI/discussions). It's a great place to ask questions, share your experiences, and connect with others interested in eoAPI and its components. \n",
"\n",
"---\n",
"\n",
"Thank you for taking the time to go through this notebook."
]
}
],
"metadata": {
Expand Down