Skip to content

Commit 50ce485

Browse files
author
Phil Varner
committed
cleanup markdown warnings in readme
1 parent 4cdb2e5 commit 50ce485

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

README.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ OAFeat defines a limited set of filtering capabilities. Filtering can only be do
114114
with only a single `bbox` (rectangular spatial filter) parameter and a single datetime (instant or interval) parameter.
115115

116116
The STAC Item Search specification extends the functionality of OAFeat in a few key ways:
117+
117118
- It allows cross-collection filtering, whereas OAFeat only allows filtering within a single collection.
118119
(`collections` parameter, accepting 0 or more collections)
119120
- It allows filtering by Item ID (`ids` parameter)
@@ -132,6 +133,7 @@ those provided by SQL. This extension also supports the Queryables mechanism tha
132133
predicates.
133134

134135
CQL2 enables more expressive queries than supported by STAC API Item Search. These include:
136+
135137
- Use of Item Property values in predicates (e.g., `item.properties.eo:cloud_cover`), using comparison operators
136138
- Items whose `datetime` values are in the month of August of the years 2017-2021, using OR and datetime comparisons
137139
- Items whose `geometry` values intersect any one of several Polygons, using `OR` and `S_INTERSECTS`
@@ -180,6 +182,7 @@ The implementation **may** support the OAFeat Part 3 *Features Filter* conforman
180182
CQL2 conformance classes to the Features resource(`/collections/{cid}/items`).
181183

182184
For additional capabilities, the following classes may be implemented:
185+
183186
- Advanced Comparison Operators
184187
(`http://www.opengis.net/spec/cql2/1.0/conf/advanced-comparison-operators`) defines the `LIKE`,
185188
`BETWEEN`, and `IN` operators. **Note**: this conformance class no longer requires implementing the
@@ -224,17 +227,20 @@ implementing CQL2 Text. From there, other comparison operators can be implemente
224227
dynamic Queryables schema.
225228

226229
Formal definitions and grammars for CQL2 can be found in the
227-
[OAFeat CQL spec](https://github.com/opengeospatial/ogcapi-features/tree/master/cql2) includes a BNF grammar
228-
for CQL2 Text and both a JSON Schema and an OpenAPI specification for CQL2 JSON. The standalone files are:
230+
[OAFeat CQL spec](https://github.com/opengeospatial/ogcapi-features/tree/master/cql2) includes
231+
a BNF grammar for CQL2 Text and both a JSON Schema and an OpenAPI specification for CQL2 JSON.
232+
The standalone files are:
229233

230234
- [cql.bnf](https://github.com/opengeospatial/ogcapi-features/blob/master/extensions/cql/standard/schema/cql.bnf)
231235
- [cql.json](https://github.com/opengeospatial/ogcapi-features/blob/master/extensions/cql/standard/schema/cql.json)
232236
- [cql.yml](https://github.com/opengeospatial/ogcapi-features/blob/master/extensions/cql/standard/schema/cql.yml)
233237

234238
These projects have or are developing CQL2 support:
235239

236-
- [stac-fastapi-pgstac](https://github.com/stac-utils/stac-fastapi-pgstac) has support via [pgstac](https://github.com/stac-utils/pgstac) for CQL2 Text and CQL2 JSON
237-
- [pygeofilter](https://github.com/geopython/pygeofilter) handles both CQL2 Text and CQL2 JSON, including the ability to convert from CQL2 Text to CQL2 JSON
240+
- [stac-fastapi-pgstac](https://github.com/stac-utils/stac-fastapi-pgstac) has support via
241+
[pgstac](https://github.com/stac-utils/pgstac) for CQL2 Text and CQL2 JSON
242+
- [pygeofilter](https://github.com/geopython/pygeofilter) handles both CQL2 Text and CQL2 JSON,
243+
including the ability to convert from CQL2 Text to CQL2 JSON
238244
- [xtraplatform-spatial](https://github.com/interactive-instruments/xtraplatform-spatial) has support for CQL2 Text and provides an [ANTLR 4 grammer](https://github.com/interactive-instruments/xtraplatform-spatial/tree/master/xtraplatform-cql/src/main/antlr/de/ii/xtraplatform/cql/infra)
239245
- [Geotools](https://github.com/geotools/geotools) has support for [CQL2 text](https://github.com/geotools/geotools/tree/main/modules/library/cql/src/main/java/org/geotools/filter/text/cql2)
240246

@@ -245,9 +251,11 @@ not compliant with this extension.
245251

246252
## Queryables
247253

248-
The Queryables mechanism allows a client to discover what terms are available for use when writing filter
249-
expressions. These terms are defined both over the entire catalog (at `/queryables`) and per collection (at `/collections/{collectionId}/queryables`). The decision as to which queryables to define
250-
for the entire catalog is at the discretion of the implementer, and can be anywhere between none and the union of all
254+
The Queryables mechanism allows a client to discover what terms are available for use when
255+
writing filter expressions. These terms are defined both over the entire catalog
256+
(at `/queryables`) and per collection (at `/collections/{collectionId}/queryables`).
257+
The decision as to which queryables to define for the entire catalog is at the discretion
258+
of the implementer, and can be anywhere between none and the union of all
251259
queryables across all collections.
252260

253261
By default, the queryables are the only terms that may be used
@@ -488,7 +496,7 @@ This example uses the queryables definition in (Interaction with Endpoints)(#int
488496
Note that `filter-lang` defaults to `cql2-text` in this case. The parameter `filter-crs` defaults
489497
to `http://www.opengis.net/def/crs/OGC/1.3/CRS84` for a STAC API.
490498

491-
```
499+
```text
492500
filter=id='LC08_L1TP_060247_20180905_20180912_01_T1_L1TP' AND collection='landsat8_l1tp'
493501
```
494502

@@ -524,7 +532,7 @@ OGC API Features filters only operate against a single collection already.
524532

525533
#### Example 2: GET with cql2-text
526534

527-
```
535+
```text
528536
filter=collection = 'landsat8_l1tp'
529537
AND eo:cloud_cover <= 10
530538
AND datetime >= TIMESTAMP('2021-04-08T04:39:23Z')
@@ -676,7 +684,7 @@ a tiny sliver of data.
676684

677685
#### Example 3: AND cql2-text (GET)
678686

679-
```
687+
```text
680688
filter=sentinel:data_coverage > 50 AND eo:cloud_cover < 10
681689
```
682690

@@ -710,7 +718,7 @@ This uses the same queryables as Example 3.
710718

711719
#### Example 4: OR cql2-text (GET)
712720

713-
```
721+
```text
714722
filter=sentinel:data_coverage > 50 OR eo:cloud_cover < 10
715723
```
716724

@@ -766,7 +774,7 @@ This queryables JSON Schema is used in these examples:
766774

767775
#### Example 5: GET with cql2-text
768776

769-
```
777+
```text
770778
filter=prop1 = prop2
771779
```
772780

@@ -794,7 +802,7 @@ have any overlap between them.
794802

795803
#### Example 6: T_INTERSECTS cql2-text (GET)
796804

797-
```
805+
```text
798806
filter=T_INTERSECTS(datetime, INTERVAL('2020-11-11T00:00:00Z', '2020-11-12T00:00:00Z'))
799807
```
800808

@@ -822,7 +830,7 @@ format uses GeoJSON geometries.
822830

823831
#### Example 7: S_INTERSECTS cql2-text (GET)
824832

825-
```
833+
```text
826834
filter=S_INTERSECTS(geometry,POLYGON((-77.0824 38.7886,-77.0189 38.7886,-77.0189 38.8351,-77.0824 38.8351,-77.0824 38.7886)))
827835
```
828836

@@ -857,7 +865,7 @@ logical operator.
857865

858866
#### Example 8: S_INTERSECTS cql2-text (GET)
859867

860-
```
868+
```text
861869
filter=S_INTERSECTS(geometry,POLYGON((-77.0824 38.7886,-77.0189 38.7886,-77.0189 38.8351,-77.0824 38.8351,-77.0824 38.7886))) OR S_INTERSECTS(geometry,POLYGON((-79.0935 38.7886,-79.0290 38.7886,-79.0290 38.8351,-79.0935 38.8351,-79.0935 38.7886)))
862870
```
863871

@@ -913,7 +921,7 @@ either of those properties.
913921

914922
#### Example 9: cql2-text (GET)
915923

916-
```
924+
```text
917925
filter=sentinel:data_coverage > 50 OR landsat:coverage_percent < 10 OR (sentinel:data_coverage IS NULL AND landsat:coverage_percent IS NULL)
918926
```
919927

@@ -957,7 +965,7 @@ The BETWEEN operator allows for checking if a numeric value is within a specifie
957965

958966
#### Example 10: cql2-text (GET)
959967

960-
```
968+
```text
961969
filter=eo:cloud_cover BETWEEN 0 AND 50
962970
```
963971

@@ -982,7 +990,7 @@ The LIKE operator allows for pattern-based string matching.
982990

983991
#### Example 11: cql2-text (GET)
984992

985-
```
993+
```text
986994
filter=mission LIKE 'sentinel%'
987995
```
988996

@@ -1012,11 +1020,11 @@ insensitive representation whereby the expressions `CASEI('Straße')`, `CASEI('s
10121020

10131021
#### Example 12: cql2-text (GET)
10141022

1015-
```
1023+
```text
10161024
filter=CASEI(provider) = CASEI('coolsat')
10171025
```
10181026

1019-
```
1027+
```text
10201028
filter=CASEI(provider) = CASEI('Straße')
10211029
```
10221030

@@ -1068,7 +1076,7 @@ defined in the Accent and Case-insensitive Comparison conformance class. In the
10681076

10691077
#### Example 13: cql2-text (GET)
10701078

1071-
```
1079+
```text
10721080
filter=ACCENTI(provider) = ACCENTI('tiburón')
10731081
```
10741082

0 commit comments

Comments
 (0)