Skip to content

Commit

Permalink
Fix filter ex interval and timestamp examples (#245)
Browse files Browse the repository at this point in the history
* fix filter extension interval and timestamp examples
  • Loading branch information
philvarner committed Dec 21, 2021
1 parent bfccb35 commit 0b91bc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Filter Extension - examples of using intervals and timestamps in CQL2 were incorrect and have been fixed

## [v1.0.0-beta.3] - 2020-08-06

### Added
Expand Down
14 changes: 7 additions & 7 deletions fragments/filter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ The implementation **must** support these conformance classes:
parameters `filter-lang`, `filter-crs`, and `filter`.
- Basic CQL2 (`http://www.opengis.net/spec/cql2/1.0/conf/basic-cql2`) defines the basic operations allowed in
the query language used for the `filter` parameter defined by Filter. This includes logical operators (`AND`, `OR`, `NOT`),
comparison operators (`=`, `<>`, `<`, `<=`, `>`, `>=`), and `IS NULL`. The comparison operators are allowed against string, numeric, boolean,
and datetime types.
comparison operators (`=`, `<>`, `<`, `<=`, `>`, `>=`), and `IS NULL`. The comparison operators are allowed against
string, numeric, boolean, date, and datetime types.
- Item Search Filter (`https://api.stacspec.org/v1.0.0-beta.5/item-search#filter:item-search-filter`) binds the Filter and
Basic CQL2 conformance classes to apply to the Item Search endpoint (`/search`). This class is the correlate of the OAFeat CQL2 Features
Filter class that binds Filter and Basic CQL2 to the Features resource (`/collections/{cid}/items`).
Expand Down Expand Up @@ -512,8 +512,8 @@ OGC API Features filters only operate against a single collection already.
filter=collection = 'landsat8_l1tp'
AND gsd <= 30
AND eo:cloud_cover <= 10
AND datetime >= '2021-04-08T04:39:23Z'
AND datetime <= '2021-05-07T12:27:57Z'
AND datetime >= TIMESTAMP('2021-04-08T04:39:23Z')
AND datetime <= TIMESTAMP('2021-05-07T12:27:57Z')
AND S_INTERSECTS(geometry, POLYGON((43.5845 -79.5442, 43.6079 -79.4893, 43.5677 -79.4632, 43.6129 -79.3925, 43.6223 -79.3238, 43.6576 -79.3163, 43.7945 -79.1178, 43.8144 -79.1542, 43.8555 -79.1714, 43.7509 -79.6390, 43.5845 -79.5442))
```

Expand All @@ -535,7 +535,7 @@ filter=collection = 'landsat8_l1tp'
},
{
"op": ">=",
"args": [ { "property": "datetime" }, "2021-04-08T04:39:23Z" ]
"args": [ { "property": "datetime" }, { "timestamp": "2021-04-08T04:39:23Z" } ]
},
{
"op": "s_intersects",
Expand Down Expand Up @@ -781,7 +781,7 @@ have any overlap between them.
#### Example 6: T_INTERSECTS cql2-text (GET)

```http
filter=datetime T_INTERSECTS 2020-11-11T00:00:00Z/2020-11-12T00:00:00Z
filter=datetime T_INTERSECTS INTERVAL('2020-11-11T00:00:00Z', '2020-11-12T00:00:00Z')
```

#### Example 6: T_INTERSECTS cql2-json (POST)
Expand All @@ -793,7 +793,7 @@ filter=datetime T_INTERSECTS 2020-11-11T00:00:00Z/2020-11-12T00:00:00Z
"op": "t_intersects",
"args": [
{ "property": "datetime" },
[ "2020-11-11T00:00:00Z", "2020-11-12T00:00:00Z"]
{ "interval" : [ "2020-11-11T00:00:00Z", "2020-11-12T00:00:00Z"] }
]
}
}
Expand Down

0 comments on commit 0b91bc1

Please sign in to comment.