You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fragments/filter/README.md
+21-13
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,8 @@ those provided by SQL. The Simple CQL conformance class requires the logical ope
96
96
the comparison operators `=`, `<`, `<=`, `>`, `>=`, `LIKE`, `IS NULL`, `BETWEEN`, and `IN`; the spatial operator
97
97
`INTERSECTS`; and the temporal operator `ANYINTERACTS`.
98
98
99
-
The ANYINTERACTS operator has effectively the same semantics as the existing `datetime` filter.
99
+
The ANYINTERACTS operator has effectively the same semantics as the `datetime` parameter
100
+
in Item Search.
100
101
101
102
CQL enables these types of queries:
102
103
- Use of Item Property values in predicates (e.g., `item.properties.eo:cloud_cover`), using comparison operators
@@ -194,6 +195,7 @@ These projects have or are developing CQL support:
194
195
195
196
-[GeoPython PyCQL](https://github.com/geopython/pycql/tree/master/pycql), and the
196
197
[Bitner fork](https://github.com/bitner/pycql) to be used in stac-fastapi
198
+
-[pygeofilter](https://github.com/geopython/pygeofilter) has support for ECQL (a superset of CQL Text) and CQL JSON
197
199
-[Franklin](https://github.com/azavea/franklin) is working on it in [this PR](https://github.com/azavea/franklin/pull/750).
198
200
-[Geotools](https://github.com/geotools/geotools) has support for [CQL text](https://github.com/geotools/geotools/tree/main/modules/library/cql/src/main/java/org/geotools/filter/text/cql2)
199
201
@@ -215,7 +217,12 @@ fully-qualified property
215
217
names not advertised in queryables (e.g., `properties.eo:cloud_cover`, in anticipation that there be some
216
218
mechanism to explicitly allow or advertise this in the future.
217
219
218
-
Queryables are advertised via a JSON Schema document retrieved from the `/queryables` endpoint. A basic Queryables
220
+
Queryables are advertised via a JSON Schema document retrieved from the `/queryables` endpoint. This endpoint at the root
221
+
retrieves queryables that apply to all collections. When used as a subresource of the collection resource
222
+
(e.g. /collections/collection1/queryables), it returns queryables pertaining only to that single collection.
223
+
224
+
It is required to implement both of these endpoints, but for a STAC API, this may simply be a static document of the
225
+
STAC-specific fields. A basic Queryables
219
226
definitions for STAC Items should include at least the fields id, collection, geometry, and datetime.
220
227
221
228
```json
@@ -404,7 +411,8 @@ Schema `$ref` mechanism to refer to a STAC schema definition. This not only allo
404
411
but also binds an arbitrarily-named Queryable to a specific STAC field. For example, in the above we know that the
405
412
`eo:cloud_cover` field is referring to the field of the same name in the EO Extension not because they happen to have the same
406
413
name, but rather because the `$ref` indicates it. The field could just as well be named "cloud_cover", "CloudCover", or "cc",
407
-
and we would still know it filtered on the EO extension `eo:cloud_cover` field.
414
+
and we would still know it filtered on the EO extension `eo:cloud_cover` field. For example, if the queryable was named
415
+
"CloudCover", a CQL expression using that queryable would look like `CloudCover <= 10`.
408
416
409
417
While these do seem quite complex to write and understand, keep in mind that query construction will likely be done with a
410
418
more ergonomic SDK, and query parsing will be done with the help of a ABNF grammar and OpenAPI schema.
@@ -427,7 +435,7 @@ This example uses the queryables definition in (Interaction with Endpoints)(#int
427
435
Note that `filter-lang` defaults to `cql-text` in this case. The parameter `filter-crs` defaults
428
436
to `http://www.opengis.net/def/crs/OGC/1.3/CRS84` for a STAC API.
0 commit comments