Skip to content

STAC Catalog

Goal

Run the stac step in the container image tagged localhost/stac:latest.

Run the container

The command to run the stac step in the container is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
podman \
    run \
    -i \
    --userns=keep-id \
    --mount=type=bind,source=/workspace/runs,target=/runs \
    --mount=type=bind,source=/workspace/runs/otsu.tif,target=/inputs/otsu.tif,readonly \
    --workdir=/runs \
    --read-only=true \
    --user=1001:100 \
    --rm \
    --env=HOME=/runs \
    --env=PYTHONPATH=/app \
    localhost/stac:latest \
    python \
    -m \
    app \
    --input-item \
    https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a-cogs/items/S2B_10TFK_20210713_0_L2A \
    --water-body \
    /inputs/otsu.tif

Step

Run the command to run the stac step with:

sh -x ${WORKSPACE}/scripts/podman-stac.sh

Expected outcome

The folder /workspace/runs contains:

(base) jovyan@coder-mrossi:~/runs$ tree .
.
├── S2B_10TFK_20210713_0_L2A
│   ├── S2B_10TFK_20210713_0_L2A.json
│   └── otsu.tif
├── catalog.json
├── crop_green.tif
├── crop_nir.tif
├── norm_diff.tif
└── otsu.tif

1 directory, 7 files