@@ -107,19 +107,19 @@ If you don't have access to PlanetScope data then replace PSScene with SkySatCol
107
107
Then make the following call:
108
108
109
109
``` console
110
- planet orders request PSScene visual --name 'My First Order' --id 20220605_124027_64_242b
110
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'My First Order' 20220605_124027_64_242b
111
111
```
112
112
113
113
Running the above command should output the JSON needed to create an order:
114
114
115
115
``` json
116
- {"name" : " My First Order" , "products" : [{"item_ids" : [" 20220605_124027_64_242b" ], "item_type" : " PSScene" , "product_bundle" : " analytic_sr_udm2" }]}
116
+ {"name" : " My First Order" , "products" : [{"item_ids" : [" 20220605_124027_64_242b" ], "item_type" : " PSScene" , "product_bundle" : " analytic_sr_udm2" }], "metadata" : { "stac" : {}} }
117
117
```
118
118
119
119
You can also use ` jq ` here to make it a bit more readable:
120
120
121
121
``` console
122
- planet orders request PSScene analytic_sr_udm2 --name 'My First Order' --id 20220605_124027_64_242b | jq
122
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'My First Order' 20220605_124027_64_242b | jq
123
123
```
124
124
125
125
``` json
@@ -133,7 +133,10 @@ planet orders request PSScene analytic_sr_udm2 --name 'My First Order' --id 2022
133
133
"item_type" : " PSScene" ,
134
134
"product_bundle" : " analytic_sr_udm2"
135
135
}
136
- ]
136
+ ],
137
+ "metadata" : {
138
+ "stac" : {}
139
+ }
137
140
}
138
141
```
139
142
@@ -143,7 +146,7 @@ The above command just prints out the necessary JSON to create an order. To actu
143
146
save the output into a file:
144
147
145
148
``` console
146
- planet orders request PSScene analytic_sr_udm2 --name "My First Order" --id 20220605_124027_64_242b \
149
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name "My First Order" 20220605_124027_64_242b \
147
150
> request-1.json
148
151
```
149
152
@@ -200,8 +203,8 @@ passing the output of the `orders request` command directly to be the input of t
200
203
command:
201
204
202
205
``` console
203
- planet orders request PSScene analytic_sr_udm2 --name 'Two Item Order' \
204
- --id 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create -
206
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Two Item Order' \
207
+ 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create -
205
208
```
206
209
207
210
The Planet CLI is designed to work well with piping, as it aims at small commands that can be
@@ -357,8 +360,8 @@ You can move that geometry to your current directory and use the following comma
357
360
tweak the geometry.geojson to refer to where you downloaded it.
358
361
359
362
``` console
360
- planet orders request PSScene analytic_sr_udm2 --clip geometry.geojson --name clipped-geom \
361
- --id 20220605_124027_64_242b | planet orders create -
363
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --clip geometry.geojson --name clipped-geom \
364
+ 20220605_124027_64_242b | planet orders create -
362
365
```
363
366
364
367
### Additional Tools
@@ -406,8 +409,8 @@ Example: `tools.json`
406
409
Ordering two scenes is easy, just add another id:
407
410
408
411
``` console
409
- planet orders request PSScene analytic_sr_udm2 --name 'Two Scenes' \
410
- --id 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create -
412
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Two Scenes' \
413
+ 20220605_124027_64_242b,20220605_124025_34_242b | planet orders create -
411
414
```
412
415
413
416
And then you can composite them together, using the 'tools' json. You can
@@ -426,8 +429,8 @@ Once you've got it saved you call the `--tools` flag to refer to the JSON file,
426
429
can pipe that to ` orders create ` .
427
430
428
431
``` console
429
- planet orders request PSScene analytic_sr_udm2 --name 'Two Scenes Composited' \
430
- --id 20220605_124027_64_242b,20220605_124025_34_242b --no-stac --tools tools-composite.json | planet orders create -
432
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Two Scenes Composited' \
433
+ 20220605_124027_64_242b,20220605_124025_34_242b --no-stac --tools tools-composite.json | planet orders create -
431
434
```
432
435
433
436
Note that we add the ` --no-stac ` option as [ STAC Metadata] ( #stac-metadata ) is not yet supported by the composite
@@ -452,8 +455,8 @@ as COG in the file format tool.
452
455
The following command just shows the output with [ tools-cog.json] ( https://raw.githubusercontent.com/planetlabs/planet-client-python/main/docs/cli/request-json/tools-cog.json ) :
453
456
454
457
``` console
455
- planet orders request PSScene analytic_sr_udm2 --name 'COG Order' \
456
- --id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-cog.json
458
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'COG Order' \
459
+ 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-cog.json
457
460
```
458
461
459
462
As shown above you can also pipe that output directly in to ` orders create ` .
@@ -504,16 +507,16 @@ so you can just use the [following json](https://raw.githubusercontent.com/plane
504
507
```
505
508
506
509
``` console
507
- planet orders request PSScene analytic_sr_udm2 --no-stac --name 'Two Scenes Clipped and Composited' \
508
- --id 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-clip-composite.json | planet orders create -
510
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --no-stac --name 'Two Scenes Clipped and Composited' \
511
+ 20220605_124027_64_242b,20220605_124025_34_242b --tools tools-clip-composite.json | planet orders create -
509
512
```
510
513
511
514
One cool little trick is that you can even stream in the JSON directly with ` curl ` , piping it into the request:
512
515
513
516
``` console
514
517
curl -s https://raw.githubusercontent.com/planetlabs/planet-client-python/main/docs/cli/request-json/tools-clip-composite.json \
515
- | planet orders request PSScene analytic_sr_udm2 --name 'Streaming Clip & Composite' \
516
- --id 20220605_124027_64_242b,20220605_124025_34_242b --tools - | planet orders create -
518
+ | planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Streaming Clip & Composite' \
519
+ 20220605_124027_64_242b,20220605_124025_34_242b --tools - | planet orders create -
517
520
```
518
521
519
522
### Harmonize
@@ -533,7 +536,7 @@ The harmonize tool allows you to compare data to different generations of satell
533
536
You may create an order request by calling [ ` tools-harmonize.json ` ] ( https://raw.githubusercontent.com/planetlabs/planet-client-python/main/docs/cli/request-json/tools-harmonize.json ) with ` --tools ` .
534
537
535
538
``` console
536
- planet orders request psscene analytic_sr_udm2 --name 'Harmonized data' --id 20200925_161029_69_2223 --tools tools-harmonize.json
539
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Harmonized data' 20200925_161029_69_2223 --tools tools-harmonize.json
537
540
```
538
541
539
542
## More options
@@ -668,9 +671,9 @@ image that was published:
668
671
669
672
670
673
``` console
671
- planet orders request SkySatCollect analytic --name 'SkySat Latest' \
672
- --id `planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 - | jq -r .id` \
673
- | planet orders create -
674
+ planet orders request --item-type SkySatCollect --bundle analytic --name 'SkySat Latest' \
675
+ `planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 - | jq -r .id` \
676
+ | planet orders create -
674
677
```
675
678
676
679
Or get the 5 latest cloud free images in an area and create an order that clips to that area, using
@@ -679,8 +682,8 @@ Or get the 5 latest cloud free images in an area and create an order that clips
679
682
``` console
680
683
ids=`planet data filter --geom geometry.geojson --range clear_percent gt 90 | planet data \
681
684
search PSScene --limit 5 - | jq -r .id | tr '\n' , | sed 's/.$//'`
682
- planet orders request PSScene analytic_sr_udm2 --name 'Clipped Scenes' \
683
- --id $ids --clip geometry.geojson | planet orders create -
685
+ planet orders request --item-type PSScene --bundle analytic_sr_udm2 --name 'Clipped Scenes' \
686
+ $ids --clip geometry.geojson | planet orders create -
684
687
```
685
688
686
689
This one uses some advanced unix capabilities like ` sed ` and ` tr ` , along with unix variables, so more
0 commit comments