-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some example Pacific datacube setup configuration
- Loading branch information
1 parent
30db4cb
commit 651eeb1
Showing
5 changed files
with
782 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.PHONY: up products index-sentinel-1 | ||
|
||
# BBOX over Samoa and Tonga | ||
BBOX := -180.0,-20.0,-170.0,-10.0 | ||
|
||
up: | ||
docker compose up | ||
|
||
products: | ||
dc-sync-products products.csv | ||
|
||
index-all: index-landsat-5 index-landsat-7 index-landsat-8 index-landsat-9 index-sentinel-1 index-sentinel-2 index-nasadem index-esri-lc | ||
|
||
index-esri-lc: | ||
stac-to-dc \ | ||
--catalog-href=https://planetarycomputer.microsoft.com/api/stac/v1/ \ | ||
--collections=io-lulc-9-class \ | ||
--bbox=${BBOX} | ||
|
||
index-nasadem: | ||
stac-to-dc \ | ||
--catalog-href=https://planetarycomputer.microsoft.com/api/stac/v1/ \ | ||
--collections=nasadem \ | ||
--bbox=${BBOX} | ||
|
||
index-sentinel-1: | ||
stac-to-dc \ | ||
--catalog-href='https://planetarycomputer.microsoft.com/api/stac/v1/' \ | ||
--bbox='$(BBOX)' \ | ||
--datetime='2023-01-01/2023-12-31' \ | ||
--collections='sentinel-1-rtc' | ||
|
||
index-sentinel-2: | ||
stac-to-dc \ | ||
--catalog-href='https://planetarycomputer.microsoft.com/api/stac/v1/' \ | ||
--bbox='$(BBOX)' \ | ||
--datetime='2023-01-01/2023-12-31' \ | ||
--collections='sentinel-2-l2a' | ||
|
||
index-landsat-5: | ||
stac-to-dc \ | ||
--catalog-href=https://planetarycomputer.microsoft.com/api/stac/v1/ \ | ||
--bbox=${BBOX} \ | ||
--collections=landsat-c2-l2 \ | ||
--options="query={\"platform\":{\"in\":[\"landsat-5\"]}}" \ | ||
--rename-product=ls5_c2l2_sr | ||
|
||
index-landsat-7: | ||
stac-to-dc \ | ||
--catalog-href=https://planetarycomputer.microsoft.com/api/stac/v1/ \ | ||
--bbox=${BBOX} \ | ||
--collections=landsat-c2-l2 \ | ||
--options="query={\"platform\":{\"in\":[\"landsat-7\"]}}" \ | ||
--rename-product=ls7_c2l2_sr | ||
|
||
index-landsat-8: | ||
stac-to-dc \ | ||
--catalog-href=https://planetarycomputer.microsoft.com/api/stac/v1/ \ | ||
--bbox=${BBOX} \ | ||
--collections=landsat-c2-l2 \ | ||
--options="query={\"platform\":{\"in\":[\"landsat-8\"]}}" \ | ||
--rename-product=ls8_c2l2_sr | ||
|
||
index-landsat-9: | ||
stac-to-dc \ | ||
--catalog-href=https://planetarycomputer.microsoft.com/api/stac/v1/ \ | ||
--bbox=${BBOX} \ | ||
--collections=landsat-c2-l2 \ | ||
--options="query={\"platform\":{\"in\":[\"landsat-9\"]}}" \ | ||
--rename-product=ls9_c2l2_sr |
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 +1,28 @@ | ||
# pacific-cube-in-a-box | ||
# Pacific Cube-in-a-Box | ||
|
||
A simple example of the use of Microsoft Planetary Computer-hosted | ||
data with the Open Data Cube. | ||
|
||
## Getting started | ||
|
||
Use the Makefile commands, or run the commands in them manually. You | ||
need to have environment variables exported for connectivity to the | ||
Postgres database too, which runs in Docker. | ||
|
||
* Export environment variables: | ||
``` bash | ||
export DB_HOSTNAME=localhost | ||
export DB_USERNAME=pacific | ||
export DB_PASSWORD=secretpassword | ||
export DB_DATABASE=odc | ||
``` | ||
* Start the postgres DB: `make up` or `docker compose up` | ||
* Add products: `make products` or `dc-sync-products products.csv` | ||
* Index data individually or do it all with `make index-all` | ||
* Now you can use any of the products. There's only one example notebook | ||
for now, for [Sentinel-1](notebooks/Sentinel1_Basic.ipynb). | ||
|
||
|
||
## Next steps | ||
|
||
Todo: get OWS and Explorer working as well a little Terria to visualise OWS |
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,10 @@ | ||
services: | ||
postgis: | ||
image: mdillon/postgis:9.6 | ||
restart: always | ||
environment: | ||
POSTGRES_USER: pacific | ||
POSTGRES_PASSWORD: secretpassword | ||
POSTGRES_DB: odc | ||
ports: | ||
- "5432:5432" |
Oops, something went wrong.