Skip to content

Commit 878c24a

Browse files
committed
docs: added labels and example of cli
1 parent fcf3f86 commit 878c24a

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# The builder image, used to build the virtual environment
22
FROM python:3.10-buster as builder
33

4+
LABEL org.opencontainers.image.source=https://github.com/geopython/eodm
5+
LABEL org.opencontainers.image.description="eodm"
6+
LABEL org.opencontainers.image.licenses=MIT
7+
8+
49
RUN pip install poetry==1.4.2
510

611
ENV POETRY_NO_INTERACTION=1 \

docs/examples.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# Examples
22

3+
## CLI Usage
4+
5+
The following list of commands moves data from Element84 into a private bucket creating a
6+
static collection and additionally to a STAC API.
7+
8+
The example assumes AWS credentials (~/.aws/credentials) file and my-bucket exists:
9+
10+
```ini
11+
[my-bucket]
12+
aws_access_key_id = ***
13+
aws_secret_access_key = ***
14+
```
15+
16+
```shell
17+
# extract from stac api
18+
eodm extract stac-api items https://earth-search.aws.element84.com/v1 sentinel-2-l2a --bbox 15.4,48.5,15.7,48.7 --datetime-interval 2024-05-01/2024-05-31 > extract
19+
20+
# transform (subset assets) some metadata
21+
eodm transform metadata band-subset red,green,blue,nir,visual,scl extract > transform
22+
23+
# transform metadata to perform some updates like dates and remove earthsearch relevant data
24+
eodm transform metadata update-metadata transform > transform1
25+
26+
export AWS_PROFILE=my-bucket
27+
export AWS_DEFAULT_PROFILE=my-bucket
28+
29+
# Create catalog
30+
eodm load stac-catalog catalog s3://my-bucket/catalog.json agri-test "Catalog for agri testing" "agri-test"
31+
32+
# Create collection
33+
eodm load stac-catalog collection s3://my-bucket/catalog.json sentinel-2-l2a "Sentinel 2 L2A subset from Element84 for demonstration" "Sentinel 2 L2A"
34+
35+
# load items into catalog collection WARNING: takes a while
36+
eodm load stac-catalog items --target-profile my-bucket s3://my-bucket/catalog.json --source-protocol http transform1 > load
37+
38+
# create stac-api collection
39+
eodm load stac-api collection https://eoapi.hub-int.eox.at/stac sentinel-2-l2a "Sentinel 2 L2A subset from Element84 for demonstration" "Sentinel 2 L2A"
40+
41+
# load items into stac-api --update not necessary if the collection is empty
42+
eodm load stac-api items https://eoapi.hub-int.eox.at/stac --update load >> load1
43+
```
44+
45+
The files created `extract`, `transform`, `load` etc. are artifacts and are result of writing
46+
STAC items to STDOUT.
47+
348
## Argo workflows
449

550
The following `Workflow` how a single run can be executed in argo workflows

0 commit comments

Comments
 (0)