Skip to content

Commit 2a7da0f

Browse files
committed
docs: minor updates
1 parent 0066ee4 commit 2a7da0f

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

docs/quickstart.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ to the server as strings, except for ``gsd`` which it casts to
6161
properties these will be sent as strings. Some servers may automatically
6262
cast this to the appropriate data type, others may not.
6363

64+
The query filter will also accept complete JSON as per the specification.
65+
6466
::
6567

6668
<property><operator><value>

docs/usage.rst

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,29 @@ section. See the :mod:`Paging <pystac_client.paging>` docs for details on how to
172172
Query Filter
173173
------------
174174

175-
If the server supports the [query filter](https://github.com/radiantearth/stac-api-spec/tree/master/fragments/query)
176-
arbitrary Item properties can be included in the search parameters. The query parameter to :class:`ItemSearch` accepts
177-
a JSON structure as in the STAC API spec, but also accepts an abbreviated syntax. Instead of JSON, a list of strings can
178-
be provided, in which case pystac-client will convert them to the equivalent JSON structure.
175+
If the Catalog supports the `Query
176+
extension <https://github.com/radiantearth/stac-api-spec/tree/master/fragments/query>`__,
177+
any Item property can also be included in the search. Rather than
178+
requiring the JSON syntax the Query extension uses, pystac-client can use a
179+
simpler syntax that it will translate to the JSON equivalent. Note
180+
however that when the simple syntax is used it sends all property values
181+
to the server as strings, except for ``gsd`` which it casts to
182+
``float``. This means that if there are extensions in use with numeric
183+
properties these will be sent as strings. Some servers may automatically
184+
cast this to the appropriate data type, others may not.
179185

180-
The syntax is simply:
186+
The query filter will also accept complete JSON as per the specification.
181187

182-
```
183-
<property><operator><value>
184-
e.g.,
188+
::
185189

186-
eo:cloud_cover<10
187-
view:off_nadir<50
188-
platform=landsat-8
189-
```
190+
<property><operator><value>
191+
192+
where operator is one of `>=`, `<=`, `>`, `<`, `=`
193+
194+
Examples:
195+
eo:cloud_cover<10
196+
view:off_nadir<50
197+
platform=landsat-8
198+
199+
Any number of properties can be included, and each can be included more
200+
than once to use additional operators.

0 commit comments

Comments
 (0)