|
1 | 1 | # Examples |
2 | 2 |
|
| 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 | + |
3 | 48 | ## Argo workflows |
4 | 49 |
|
5 | 50 | The following `Workflow` how a single run can be executed in argo workflows |
|
0 commit comments