@@ -61,7 +61,7 @@ meant to be easily interoperable with other tools, e.g. `jq
6161<https://stedolan.github.io/jq/> `_. For example, we could output just the name
6262and date range of each mosaic with::
6363
64- planet mosaics list | jq -r '.mosaics[] | [.name, .first_acquired, .last_acquired] | @tsv'
64+ planet mosaics list | jq -r '.mosaics[] | [.name, .first_acquired, .last_acquired] | @tsv'
6565
6666Get basic information for a specific mosaic::
6767
@@ -73,7 +73,7 @@ list all quads. Keep in mind that there may be millions for a global mosaic.)::
7373 planet mosaics search global_monthly_2018_09_mosaic --limit=10
7474
7575Find all quads inside a particular area of interest::
76-
76+
7777 planet mosaics search global_monthly_2018_09_mosaic --bbox=-95.5,29.6,-95.3,29.8
7878
7979Note that the format of ``--bbox `` is "xmin,ymin,xmax,ymax", so longitude comes
@@ -193,7 +193,7 @@ Orders Examples
193193-----------------
194194
195195List all recent orders for the authenticated user::
196-
196+
197197 planet orders list
198198
199199Get the status of a single order by Order ID::
@@ -203,17 +203,17 @@ Get the status of a single order by Order ID::
203203Note that you may want to parse the JSON that's output into a more human
204204readable format. The cli does not directly provide options for this, but is
205205meant to be easily interoperable with other tools, e.g. `jq
206- <https://stedolan.github.io/jq/> `_.
206+ <https://stedolan.github.io/jq/> `_.
207207
208208To cancel a running order by given order ID::
209209
210210 planet orders cancel <order ID>
211211
212- To download an order to your local machine::
212+ To download an order to your local machine::
213213
214- planet orders download <order ID>
214+ planet orders download <order ID>
215215
216- Optionally, a `--dest <path to destination> ` flag may be specified too.
216+ Optionally, a `--dest <path to destination> ` flag may be specified too.
217217
218218Creating an Order
219219..................
@@ -227,19 +227,148 @@ The minimal command to create a simple order looks something like::
227227If no toolchain or delivery details are specified, a basic order with download
228228delivery will be placed for the requested bundle including the item id(s) specified.
229229
230- Additionally, optional toolchain & delivery details can be provided on the
231- command line, e.g.:::
230+ In the place of `--id `, you can insert a Data search string. This will populate
231+ the list of IDs from a search. For example::
232+
233+ planet orders create --name "my order" \
234+ --ids_from_search $'--item-type PSScene3Band --date acquired gt 2017-02-14 --date acquired lt 2017-03-14 --limit 6 --geom \'{
235+ "type": "FeatureCollection",
236+ "features": [
237+ {
238+ "type": "Feature",
239+ "properties": {},
240+ "geometry": {
241+ "type": "Polygon",
242+ "coordinates": [
243+ [
244+ [
245+ -116.40701293945311,
246+ 43.061363052307875
247+ ],
248+ [
249+ -116.4451217651367,
250+ 43.05032512283074
251+ ],
252+ [
253+ -116.4320755004883,
254+ 43.017450433440814
255+ ],
256+ [
257+ -116.37508392333984,
258+ 43.01092359150748
259+ ],
260+ [
261+ -116.3393783569336,
262+ 43.03677585761058
263+ ],
264+ [
265+ -116.35894775390624,
266+ 43.06186472916744
267+ ],
268+ [
269+ -116.40701293945311,
270+ 43.061363052307875
271+ ]
272+ ]
273+ ]
274+ }
275+ }
276+ ]
277+ }\'' \
278+ --bundle visual \
279+ --item-type psscene3band \
280+ --zip bundle --email \
281+ --clip '{
282+ "type": "Polygon",
283+ "coordinates": [
284+ [
285+ [
286+ -116.40701293945311,
287+ 43.061363052307875
288+ ],
289+ [
290+ -116.4451217651367,
291+ 43.05032512283074
292+ ],
293+ [
294+ -116.4320755004883,
295+ 43.017450433440814
296+ ],
297+ [
298+ -116.37508392333984,
299+ 43.01092359150748
300+ ],
301+ [
302+ -116.3393783569336,
303+ 43.03677585761058
304+ ],
305+ [
306+ -116.35894775390624,
307+ 43.06186472916744
308+ ],
309+ [
310+ -116.40701293945311,
311+ 43.061363052307875
312+ ]
313+ ]
314+ ]
315+ }'
316+
317+ Note that `--ids_from_search ` is passed as a string value.
318+
319+ Additionally, optional toolchain & delivery details can be provided on the command line, e.g.::
232320
233321 planet orders create --name "my order" \
234322 --id 20151119_025740_0c74,20151119_025741_0c74 \
235323 --bundle visual --item-type psscene3band --zip order --email
236324
237325This places the same order as above, and will also provide a .zip archive
238- download link for the full order, as well as email notification.
326+ download link for the full order, as well as email notification. If you change
327+ `--zip order ` to `--zip bundle `, the individual bundles will be zipped rather
328+ than the full order.
329+
330+ You can also clip the items in an order by providing a GeoJSON AOI Geometry
331+ with the `--clip ` parameter::
332+
333+ planet orders create --name "my order" ... \
334+ --clip '{
335+ "type": "Polygon",
336+ "coordinates": [
337+ [
338+ [
339+ -163.828125,
340+ -44.59046718130883
341+ ],
342+ [
343+ 181.7578125,
344+ -44.59046718130883
345+ ],
346+ [
347+ 181.7578125,
348+ 78.42019327591201
349+ ],
350+ [
351+ -163.828125,
352+ 78.42019327591201
353+ ],
354+ [
355+ -163.828125,
356+ -44.59046718130883
357+ ]
358+ ]
359+ ]
360+ }'
361+
362+ Alternatively, you can specify a file that contains your GeoJSON AOI using the
363+ `@ ` notation, e.g. `--clip @path/to/aoi.json `.
364+
365+ It should be noted that if the clip AOI you specify does not intersect with the
366+ items in `--id ` or `--ids_from_search ` you may end up with a zero result order.
367+ If some of the items intersect, you will receive those items.
239368
240369The Orders API allows you to specify a toolchain of operations to be performed
241370on your order prior to download. To read more about tools & toolchains, visit
242- `the docs <https://developers.planet.com/docs/orders/tools-toolchains/ >`_ .
371+ `the docs <https://developers.planet.com/docs/orders/tools-toolchains/ >`_ .
243372
244373To add tool operations to your order, use the `--tools ` option to specify a
245374json-formatted file containing an array (list) of the desired tools an their
@@ -271,16 +400,16 @@ order, you would create a `.json` file similar to the following::
271400 "name_template": "C1232_30_30_{tilex:04d}_{tiley:04d}"
272401 }
273402 }
274- ]
403+ ]
275404
276405
277406Similarly, you can also specify cloud delivery options on an order create
278407command with the `--cloudconfig <path to json file> ` option. In this case, the
279408json file should contain the required credentials for your desired cloud
280409storage destination, for example::
281410
282- {
283- "amazon_s3":{
411+ {
412+ "amazon_s3":{
284413 "bucket":"foo-bucket",
285414 "aws_region":"us-east-2",
286415 "aws_access_key_id":"",
0 commit comments