@@ -138,8 +138,7 @@ To create an order you need a name, a [bundle](https://developers.planet.com/api
138
138
one or more id's, and an [ item type] ( https://developers.planet.com/docs/apis/data/items-assets/#item-types ) :
139
139
140
140
``` console
141
- planet orders request --name "My First Order" --bundle analytic_sr_udm2 --id 20220605_124027_64_242b \
142
- --item-type PSScene
141
+ planet orders request PSScene analytic_sr_udm2 --name "My First Order" --id 20220605_124027_64_242b
143
142
```
144
143
145
144
You should replace the ` id ` with a scene you have access to, using [ Explorer] ( https://planet.com/explorer )
@@ -157,8 +156,7 @@ easier to read, but you can still copy and paste the full line into your command
157
156
You can also use ` jq ` here to make it a bit more readable:
158
157
159
158
``` console
160
- planet orders request --name "My First Order" --bundle analytic_sr_udm2 --id 20220605_124027_64_242b \
161
- --item-type PSScene | jq
159
+ planet orders request PSScene analytic_sr_udm2 --name "My First Order" --id 20220605_124027_64_242b | jq
162
160
```
163
161
164
162
``` json
@@ -182,8 +180,8 @@ The above command just prints out the necessary JSON to create an order. To actu
182
180
save the output into a file:
183
181
184
182
``` console
185
- planet orders request --name "My first Order" --bundle analytic_sr_udm2 --id 20220605_124027_64_242b \
186
- --item-type PSScene > request-1.json
183
+ planet orders request PSScene analytic_sr_udm2 --name "My first Order" --id 20220605_124027_64_242b \
184
+ > request-1.json
187
185
```
188
186
189
187
This saves the above JSON in a file called ` request-1.json `
@@ -234,8 +232,8 @@ passing the output of the `orders request` command directly to be the input of t
234
232
command:
235
233
236
234
``` console
237
- planet orders request --name "My Second Order" --bundle analytic_sr_udm2 \
238
- --id 20220605_124027_64_242b,20220605_124025_34_242b --item-type PSScene | planet orders create
235
+ planet orders request PSScene analytic_sr_udm2 --name "My Second Order" \
236
+ --id 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create
239
237
```
240
238
241
239
The Planet CLI is designed to work well with piping, as it aims at small commands that can be
@@ -343,17 +341,17 @@ You can move that geometry to your current directory and use the following comma
343
341
tweak the geometry.geojson to refer to where you downloaded it.
344
342
345
343
``` console
346
- planet orders request --item-type PSScene --clip geometry.geojson --name clipped-geom \
347
- --bundle analytic_sr_udm2 -- id 20220605_124027_64_242b | planet orders create
344
+ planet orders request PSScene analytic_sr_udm2 --clip geometry.geojson --name clipped-geom \
345
+ --id 20220605_124027_64_242b | planet orders create
348
346
```
349
347
350
348
#### Two Scenes, composited
351
349
352
350
Ordering two scenes is easy, just add another id:
353
351
354
352
``` console
355
- planet orders request --item-type PSScene --name "Two Scenes" \
356
- --bundle analytic_sr_udm2 -- id 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create
353
+ planet orders request PSScene analytic_sr_udm2 --name "Two Scenes" \
354
+ --id 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create
357
355
```
358
356
359
357
And then you can composite them together, using the 'tools' json. You can
@@ -372,7 +370,7 @@ Once you've got it saved you call the `--tools` flag to refer to the JSON file,
372
370
can pipe that to ` orders create ` .
373
371
374
372
``` console
375
- planet orders request --item-type PSScene --name "Two Scenes Composited" --bundle analytic_sr_udm2 \
373
+ planet orders request PSScene analytic_sr_udm2 --name "Two Scenes Composited" \
376
374
--id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-composite.json | planet orders create
377
375
```
378
376
@@ -402,8 +400,8 @@ If you'd like the above order as a COG you Get the output as a cloud-optimized G
402
400
The following command just shows the output, you can pipe into orders create if you'd like:
403
401
404
402
``` console
405
- planet orders request --item-type PSScene --name "Two Scenes Composited" \
406
- --bundle analytic_sr_udm2 -- id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-cog.json
403
+ planet orders request PSScene analytic_sr_udm2 --name "Two Scenes Composited" \
404
+ --id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-cog.json
407
405
```
408
406
409
407
#### Clip & Composite
@@ -413,16 +411,16 @@ not use `--clip` and `--tools` in the same call. There is not yet CLI calls to g
413
411
so you can just grab the [ full tools.json] ( https://raw.githubusercontent.com/planetlabs/planet-client-python/main/docs/data/tools-clip-composite.json )
414
412
415
413
``` console
416
- planet orders request --item-type PSScene --name "Two Scenes Clipped and Composited" \
417
- --bundle analytic_sr_udm2 -- id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-clip-composite.json
414
+ planet orders request PSScene analytic_sr_udm2 --name "Two Scenes Clipped and Composited" \
415
+ --id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-clip-composite.json
418
416
```
419
417
420
418
One cool little trick is that you can even stream in the JSON directly with ` curl ` , piping it into the request:
421
419
422
420
``` console
423
421
curl -s https://raw.githubusercontent.com/planetlabs/planet-client-python/main/docs/data/tools-clip-composite.json \
424
- | planet orders request --item-type PSScene --name "Streaming Clip & Composite" \
425
- --bundle analytic_sr_udm2 -- id 20220605_124027_64_242b,20220605_124025_34_242b --tools - | planet orders create
422
+ | planet orders request PSScene analytic_sr_udm2 --name "Streaming Clip & Composite" \
423
+ --id 20220605_124027_64_242b,20220605_124025_34_242b --tools - | planet orders create
426
424
```
427
425
428
426
#### Using Orders output as input
@@ -708,7 +706,7 @@ image that was published:
708
706
709
707
710
708
``` console
711
- planet orders request --name "SkySat Latest" --item-type SkySatCollect --bundle analytic \
709
+ planet orders request SkySatCollect analytic --name "SkySat Latest" \
712
710
--id `planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 - | jq -r .id` \
713
711
| planet orders create
714
712
```
@@ -719,7 +717,7 @@ Or get the 5 latest cloud free images in an area and create an order that clips
719
717
``` console
720
718
ids=`planet data filter --geom geometry.geojson --range clear_percent gt 90 | planet data \
721
719
search PSScene --limit 5 - | jq -r .id | tr '\n' , | sed 's/.$//'`
722
- planet orders request --name "Clipped Scenes" --item-type PSScene --bundle analytic_sr_udm2 \
720
+ planet orders request PSScene analytic_sr_udm2 --name "Clipped Scenes" \
723
721
--id $ids --clip geometry.geojson | planet orders create -
724
722
```
725
723
0 commit comments