Skip to content

Commit 7f26da5

Browse files
committed
Add CLI docs for new features in 2.1
Namely: * subscriptions request-pv * subscriptions request --clip-to-source * subscriptions results --csv * orders request --archive-type zip --single-archive * orders request --delivery
1 parent 4bc6735 commit 7f26da5

File tree

2 files changed

+58
-46
lines changed

2 files changed

+58
-46
lines changed

docs/cli/cli-orders.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,33 @@ planet orders request \
149149
}
150150
```
151151

152+
#### Zip archives of bundles and orders
153+
154+
You can request that all files of a bundle be zipped together by using the `--archive-type` option. The only type of archive currently available is "zip".
155+
156+
```sh
157+
planet orders request \
158+
--item-type PSScene \
159+
--bundle analytic_sr_udm2 \
160+
--name 'My First Zipped Order' \
161+
--archive-type zip \
162+
20220605_124027_64_242b
163+
```
164+
165+
You can request that all files of the entire order be zipped together by using the `--single-archive` option.
166+
167+
```sh
168+
planet orders request \
169+
--item-type PSScene \
170+
--bundle analytic_sr_udm2 \
171+
--name 'My First Zipped Order' \
172+
--archive-type zip \
173+
--single-archive \
174+
20220605_124027_64_242b,20220605_124025_34_242b
175+
```
176+
177+
*New in version 2.1*
178+
152179
### Save an Order Request
153180

154181
The above command just prints out the necessary JSON to create an order. To actually use it you can
@@ -613,13 +640,13 @@ Orders with Google Earth Engine delivery will force the STAC flag to false.
613640
### Cloud Delivery
614641

615642
Another option is to delivery your orders directly to a cloud bucket, like AWS S3 or Google Cloud Storage.
616-
The file given with the `--cloudconfig` option should contain JSON that follows
643+
The file given with the `--delivery` option should contain JSON that follows
617644
the options and format given in
618645
[Delivery to Cloud Storage](https://developers.planet.com/docs/orders/delivery/#delivery-to-cloud-storage).
619646

620647
An example would be:
621648

622-
Example: `cloudconfig.json`
649+
Example: `delivery.json`
623650

624651
```json
625652
{
@@ -633,6 +660,12 @@ Example: `cloudconfig.json`
633660
}
634661
```
635662

663+
*New in 2.1*
664+
665+
!!! note
666+
667+
`--cloudconfig` was the name of this option in version 2.0 and can continue to be used as an alias for `--delivery`.
668+
636669
### Using Orders output as input
637670

638671
One useful thing to note is that the order JSON that reports status and location is a valid Orders API request.

docs/cli/cli-subscriptions.md

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,33 @@ planet subscriptions get cb817760-1f07-4ee7-bba6-bcac5346343f
157157
To see what items have been delivered to your cloud bucket you can use the `results` command:
158158

159159
```sh
160-
planet subscriptions results cb817760-1f07-4ee7-bba6-bcac5346343f
160+
planet subscriptions results SUBSCRIPTION_ID
161161
```
162162

163+
`SUBSCRIPTION_ID` above is a placeholder for a unique subscription identifier, which will be a UUID like `cb817760-1f07-4ee7-bba6-bcac5346343f`.
164+
163165
By default this displays the first 100 results. As with other commands, you can use the `--limit` param to
164166
set a higher limit, or set it to 0 to see all results (this can be quite large with subscriptions results).
165167

166168
You can also filter by status:
167169

168170
```sh
169-
planet subscriptions results --status processing
171+
planet subscriptions results SUBSCRIPTION_ID --status processing
170172
```
171173

172174
The available statuses are `created`, `queued`, `processing`, `failed`, and `success`. Note it’s quite useful
173175
to use `jq` to help filter out results as well.
174176

177+
#### Results as comma-seperated values (CSV)
178+
179+
Planetary Variable subscribers can benefit from retrieving results as a CSV. The results contain variable statistics and can serve as data for time series analysis and visualization.
180+
181+
```sh
182+
planet subscriptions results SUBSCRIPTION_ID --csv
183+
```
184+
185+
*New in version 2.1*
186+
175187
### Update Subscription
176188

177189
You can update a subscription that is running, for example to change the 'tools' it’s using or to alter
@@ -351,51 +363,18 @@ for Orders, future of the versions of the CLI will likely add `tools` convenienc
351363

352364
The most used tool is the `clip` operation, which lets you pass a geometry to the
353365
Subscriptions API and it creates new images that only have pixels within the geometry you
354-
gave it. We’ll use the same geometry from [above](#geometry), as it is quite
355-
typical to use the same subscription geometry as the clip geometry, so you don't get
356-
any pixels outside of your area of interest (99.9% of all subscriptions use the clip
357-
tool, so it’s strongly recommended to also use clip). The proper 'clip' tool for it
358-
would be:
366+
gave it. 99% of the time you will want to clip to the subscription geometry. The easiest way to do this is to use the `--clip-to-source` option added to the `subscriptions request` command in version 2.1.
359367

360-
```json
361-
[
362-
{
363-
"type": "clip",
364-
"parameters": {
365-
"aoi": {
366-
"type": "Polygon",
367-
"coordinates": [
368-
[
369-
[
370-
-163.828125,
371-
-44.59046718130883
372-
],
373-
[
374-
181.7578125,
375-
-44.59046718130883
376-
],
377-
[
378-
181.7578125,
379-
78.42019327591201
380-
],
381-
[
382-
-163.828125,
383-
78.42019327591201
384-
],
385-
[
386-
-163.828125,
387-
-44.59046718130883
388-
]
389-
]
390-
]
391-
}
392-
}
393-
}
394-
]
368+
```sh
369+
planet subscriptions request \
370+
--name 'Clipped Subscription' \
371+
--source request-catalog.json \
372+
--delivery cloud-delivery.json \
373+
--clip-to-source
395374
```
396375

397-
You can save this tools as `tools.json` to include in the `subscriptions request`
398-
command.
376+
*New in version 2.1*
377+
399378

400379
#### Additional Tools
401380

0 commit comments

Comments
 (0)