@@ -17,18 +17,18 @@ At this point you should have completed [Step 5](../get-started/quick-start-guid
1717of the quick start guide, and run your first full data search command:
1818
1919```
20- planet data search PSScene filter.json > recent-psscene.json
20+ planet data search PSScene --filter filter.json > recent-psscene.json
2121```
2222
23- This saves the latest 100 scenes in a file, that you can open and look at.
23+ This saves the descriptions of the latest 100 standard-quality scenes you have permissions to download in a file, that you can open and look at.
2424
2525### Pretty printing
2626
2727You will likely notice that this file is quite wide, with one very long line for each Planet
2828item returned. You can make for a more readable file by using the ` --pretty ` flag:
2929
3030```
31- planet data search --pretty PSScene filter.json > recent-psscene.json
31+ planet data search --pretty PSScene --filter filter.json > recent-psscene.json
3232```
3333
3434The ` --pretty ` flag is built into most of the CLI calls. But you can also achieve the
@@ -38,7 +38,7 @@ piping any JSON output through it prints it in a more readable form. So the foll
3838command will do the same thing as the previous one:
3939
4040```
41- planet data search PSScene filter.json | jq > recent-psscene.json
41+ planet data search PSScene --filter filter.json | jq > recent-psscene.json
4242```
4343
4444You can read a bit [ more about jq] ((cli-intro.md#jq) in the CLI intro.
@@ -49,14 +49,14 @@ You also don't have to save the output to a file. If you don't redirect it into
4949it will just print out on the console.
5050
5151```
52- planet data search PSScene filter.json
52+ planet data search PSScene -- filter filter .json
5353```
5454
5555If you enter this command you'll see the output stream by. Here you can use jq again, and
5656it'll often give you nice syntax highlighting in addition to formatting.
5757
5858```
59- planet data search PSScene filter.json | jq
59+ planet data search PSScene --filter filter.json | jq
6060```
6161
6262### Create filter and search in one call
@@ -66,14 +66,25 @@ passing the output of the `data filter` command directly to be the input of the
6666command:
6767
6868```
69- planet data filter | planet data search --pretty PSScene -
69+ planet data filter --permission --std-quality | planet data search --pretty PSScene --filter -
7070```
7171
7272Note the dash (` - ` ), which explicitly tells the CLI to use the output from the call that is piped into it.
7373
7474You can learn more about the pipe command, as well as the ` > ` command above in the
7575[ Piping & redirection section] ( cli-intro.md#piping-redirection ) of the CLI Introduction.
7676
77+ ### Search without filtering
78+
79+ If no filtering is required, the search command can be called directly:
80+
81+ ```
82+ planet data search PSScene
83+ ```
84+
85+ This outputs the last 100 scenes.
86+
87+
7788### Search on Item Type
7889
7990These first searches were done on the [ PSScene] ( https://developers.planet.com/docs/data/psscene/ ) 'item type', but you
@@ -82,7 +93,7 @@ its catalog. The item type is the first argument of the `search` command, follow
8293you can specify any number of item types here:
8394
8495```
85- planet data filter | planet data search PSScene,Sentinel2L1C,Landsat8L1G,SkySatCollect -
96+ planet data search PSScene,Sentinel2L1C,Landsat8L1G,SkySatCollect
8697```
8798
8899This will search for all the most recent images captured by PlanetScope, SkySat, Sentinel 2 and Landsat 8 satellites.
@@ -96,7 +107,7 @@ By default the `search` command returns only the 100 first scenes. But with the
96107under the hood will automatically page through all the results from the API.
97108
98109```
99- planet data filter | planet data search --limit 3000 PSScene
110+ planet data search --limit 3000 PSScene
100111```
101112
102113Note you can also do a call with no limits if you set the limit to ` 0 ` . Though don't use this haphazardly, or you'll be
@@ -111,13 +122,13 @@ the `planet collect` method to transform the output from the Data API to valid G
111122output to it:
112123
113124``` console
114- planet data filter | planet data search PSScene - | planet collect -
125+ planet data search PSScene | planet collect -
115126```
116127
117128If you want to visualize this you can save it as a file:
118129
119130``` console
120- planet data filter | planet data search PSScene - | planet collect - > planet-search.geojson
131+ planet data search PSScene | planet collect - > planet-search.geojson
121132```
122133
123134This you can then open with your favorite GIS program, or see this
@@ -138,13 +149,13 @@ descending order. The options are are:
138149The lets you do things like get the id of the most recent skysat image taken (that you have download access to):
139150
140151``` console
141- planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 -
152+ planet data search SkySatCollect --sort 'acquired desc' --limit 1
142153```
143154
144155And you can also just get the ID, using ` jq `
145156
146157``` console
147- planet data filter | planet data search SkySatCollect --sort 'acquired desc' --limit 1 - | jq -r .id
158+ planet data search SkySatCollect --sort 'acquired desc' --limit 1 - | jq -r .id
148159```
149160
150161
@@ -202,14 +213,14 @@ of Iowa. You can copy it and save as a file called `geometry.geojson`
202213And then run it with this command:
203214
204215``` console
205- planet data filter --geom geometry.geojson | planet data search PSScene -
216+ planet data filter --geom geometry.geojson | planet data search PSScene --filter -
206217```
207218
208219Note that by default all searches with the command-line return 100 results, but you can easily increase that with
209220the ` --limit ` flag:
210221
211222``` console
212- planet data filter --geom geometry.geojson | planet data search --limit 500 PSScene -
223+ planet data filter --geom geometry.geojson | planet data search --limit 500 PSScene --filter -
213224```
214225
215226Creating geometries for search can be annoying in a command-line workflow, but there are some ideas in the
@@ -220,7 +231,7 @@ Creating geometries for search can be annoying in a command-line workflow, but t
220231Some of the most common filtering is by date. You could get all imagery acquired before August 2021:
221232
222233``` console
223- planet data filter --date-range acquired lt 2021-08-01 | planet data search PSScene -
234+ planet data filter --date-range acquired lt 2021-08-01 | planet data search PSScene --filter -
224235```
225236
226237The 'operator' in this case is 'less than' (` lt ` ). The options are:
@@ -236,7 +247,7 @@ do a search for all images in July of 2021:
236247
237248``` console
238249planet data filter --date-range acquired gte 2021-07-01 --date-range acquired lt 2021-08-01 | \
239- planet data search PSScene -
250+ planet data search PSScene --filter -
240251```
241252
242253The date input understands [ RFC 3339] ( https://datatracker.ietf.org/doc/html/rfc3339 ) and
@@ -246,7 +257,7 @@ on July 1st 2021:
246257
247258``` console
248259planet data filter --date-range acquired gte 2021-07-01:06:20:10 --date-range acquired lt 2021-07-01:06:20:15 | \
249- planet data search PSScene -
260+ planet data search PSScene --filter -
250261```
251262
252263### Range Filter
@@ -255,7 +266,7 @@ The range filter uses the same operators as the date filter, but works against a
255266of these tend to be ones about cloudy pixels. For example you can search for data with clear pixels greater than 90%:
256267
257268``` console
258- planet data filter --range clear_percent gt 90
269+ planet data filter --range clear_percent gt 90 | planet data search PSScene --filter -
259270```
260271
261272### String-In Filter
@@ -264,19 +275,20 @@ For properties that are strings you can use the `string-in` filter. For example
264275with PS2 instrument:
265276
266277``` console
267- planet data filter --string-in instrument PS2 | planet data search PSScene -
278+ planet data filter --string-in instrument PS2 | planet data search PSScene --filter -
268279```
269280
270281You can specify multiple strings to match, with a comma:
271282
272283``` console
273- planet data filter --string-in instrument PS2,PSB.SD | planet data search PSScene -
284+ planet data filter --string-in instrument PS2,PSB.SD | planet data search PSScene --filter -
285+
274286```
275287
276288Another example is to select all data in a single strip:
277289
278290``` console
279- planet data filter --string-in strip_id 5743640 | planet data search PSScene -
291+ planet data filter --string-in strip_id 5743640 | planet data search PSScene --filter -
280292```
281293
282294Note that in all these commands we are piping the results into the search. If you don't include the pipe then you'll
@@ -287,13 +299,13 @@ get the filter output, which can be interested to inspect to see exactly what is
287299You can limit your search to only data with a particular asset, for example search just for 8-band analytic assets:
288300
289301``` console
290- planet data filter --asset ortho_analytic_8b_sr | planet data search PSScene -
302+ planet data filter --asset ortho_analytic_8b_sr | planet data search PSScene --filter -
291303```
292304
293305Or 8-band assets that also have a UDM.
294306
295307``` console
296- planet data filter --asset ortho_analytic_8b_sr --asset udm2 | planet data search PSScene -
308+ planet data filter --asset ortho_analytic_8b_sr --asset udm2 | planet data search PSScene --filter -
297309```
298310
299311You can find the list of available assets in each Item Type Page, like
@@ -306,14 +318,14 @@ sure you got the asset right, and it's valid for the item-types you're searching
306318
307319### Permission Filter
308320
309- The 'permission filter' is set to true by default, since most people want to search only for data they have access to
310- and are able to download. But if you'd like to just get search Planet's catalog and get a sense of what is out there
311- you can set the permission filter to false :
321+ By default, no search filters are applied. However, many people want to search only for data they have access to download
322+ that are of standard (aka not test) quality. Therefore, these filters can be easily added with the ` --permission ` and
323+ ` --std-quality ` flags. To use the permission and standard quality filters :
312324
313325``` console
314- planet data filter --permission false --asset ortho_analytic_8b_sr | planet data search PSScene -
326+ planet data filter --permission --std-quality --asset ortho_analytic_8b_sr | planet data search PSScene --filter -
315327```
316328
317329## Stats
318330
319- TODO
331+ TODO
0 commit comments