Skip to content

Commit c2d8efa

Browse files
updating README
1 parent ffb4bd4 commit c2d8efa

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ python setup.py develop
99
```
1010

1111
# Usage
12-
Use the [stac-updater CLI](stac_updater/cli.py) to build and deploy your service. Updating a static collection, for example, is accomplished as follows:
12+
Use the [stac-updater CLI](stac_updater/cli.py) to build and deploy your service.
1313

14+
## Update Static Collection
1415
```
1516
# Start a new service
1617
stac-updater new-service
@@ -25,4 +26,38 @@ stac-updater modify-kickoff --type s3 --bucket_name stac-updater-kickoff
2526
stac-updater deploy
2627
```
2728

28-
Once deployed, any STAC Item uploaded to the `stac-updater-kickoff` bucket will be ingested by the service and added to the `https://stac.com/landsat-8-l1/catalog.json` collection.
29+
Once deployed, any STAC Item uploaded to the `stac-updater-kickoff` bucket will be ingested by the service and added to the `https://stac.com/landsat-8-l1/catalog.json` collection. Regardless of event source, the service expects the following JSON payload:
30+
31+
| Field Name | Type | Description | Example |
32+
| ---------- | ----- | ----------- | ------- |
33+
| stac_item | dict | **REQUIRED.** [STAC Item](https://github.com/radiantearth/stac-spec/tree/master/item-spec) to ingest into collection. | [link](https://github.com/radiantearth/stac-spec/blob/dev/item-spec/examples/sample-full.json) |
34+
| path | str | String pattern indicating subcatalogs. Used by [sat-stac](https://github.com/sat-utils/sat-stac/blob/master/tutorial-1.ipynb#Views) to automatically build sub catalogs from item properties. | '${landsat:path}/${landsat:row}' |
35+
| filename | str | String pattern indicating filename. Used by [sat-stac](https://github.com/sat-utils/sat-stac/blob/master/tutorial-1.ipynb#Views) to automatically build item filename from item properties.| '${date}/${id}' |
36+
37+
Each call to `update-collection` tells the services to update a single collection. Updating multiple collections within a single deployment is accomplished with multiple calls to `update-collection`. When updating multiple collections, the services uses a SNS fanout pattern to distribute messages across multiple queues (1 queue per collection).
38+
39+
![abc](docs/images/update-collection.png)
40+
41+
## SNS Notifications
42+
You may additionally deploy a SNS topic which publishes messages whenever a STAC Item is succesfully uploaded to a collection.
43+
44+
```
45+
# Add SNS notification
46+
stac-updater add-notifications --topic_name stac-updater-notifications
47+
```
48+
49+
Once deployed, end-users may subscribe to the newly created SNS topic to be notified when new items are added. The SNS Topic supports filtering on bbox and collection through a SNS Filter Policy. The following policy notifies a subscriber only when a new STAC Item is added to the `landsat-8-l1` catalog within a 1x1 degree bounding box.
50+
51+
```json
52+
{
53+
"bbox.xmin": [{"numeric":[">=",-118]}],
54+
"bbox.ymin": [{"numeric":[">=",33]}],
55+
"bbox.xmax": [{"numeric":["<=",-117]}],
56+
"bbox.ymax": [{"numeric":["<=",34]}],
57+
"collection": ["landsat-8-l1"]
58+
}
59+
```
60+
61+
# TODOS
62+
- Add support for dynamic catalogs ([sat-api](https://github.com/sat-utils/sat-api), [staccato](https://github.com/boundlessgeo/staccato)).
63+
- Add aggregator service for metrics/logging etc.

0 commit comments

Comments
 (0)