Skip to content

Commit

Permalink
collections/searchable: below-sd parameter requirements and other fixes
Browse files Browse the repository at this point in the history
- Fixed requirement IDs
- Simplified and improved multiple requirements
  • Loading branch information
jerstlouis committed Oct 24, 2024
1 parent b5a9ca9 commit 7969180
Show file tree
Hide file tree
Showing 20 changed files with 81 additions and 102 deletions.
50 changes: 26 additions & 24 deletions collections/clause_10_searchable_collections.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ The `bbox` parameter is used to select collections based on the geospatial footp

The `bbox` parameter is defined as follows:

include::./requirements/searchable-collections/REQ_rc-bbox-definition.adoc[]
include::./requirements/searchable-collections/REQ_searchable-bbox-definition.adoc[]

While the processing of the `bbox` parameter is specific to the resource and operation for which it is applied, there is a general set of requirements which all implementations must address.

include::./requirements/searchable-collections/REQ_rc-bbox-response.adoc[]
include::./requirements/searchable-collections/REQ_searchable-bbox-response.adoc[]

"Intersects" means that a coordinate that is part of the spatial geometry of the resource falls within the area specified in the parameter `bbox`. This includes the boundaries of the geometries. For curves the boundary includes the start and end position. For surfaces the boundary includes the outer and inner rings.

Expand Down Expand Up @@ -84,9 +84,9 @@ The `datetime` parameter selects collections based on their temporal extent.

The `datetime` parameter is defined as follows:

include::./requirements/searchable-collections/REQ_rc-datetime-definition.adoc[]
include::./requirements/searchable-collections/REQ_searchable-datetime-definition.adoc[]

include::./requirements/searchable-collections/REQ_rc-datetime-response.adoc[]
include::./requirements/searchable-collections/REQ_searchable-datetime-response.adoc[]

"Intersects" means that the time (instant or period) specified in the parameter `datetime` includes a timestamp that is part of the temporal extent of the collection (again, a time instant or period).
For time periods this includes the start and end time.
Expand Down Expand Up @@ -135,7 +135,7 @@ Collections matching any of the terms separated by a comma are selected.

Terms separated by a space must appear in the order specified, with nothing but white space in between, to be considered a match.

include::./requirements/searchable-collections/REQ_rc-q.adoc[]
include::./requirements/searchable-collections/REQ_searchable-q.adoc[]

[[searchable-query-parameter]]
=== Parameter `query`
Expand All @@ -154,60 +154,62 @@ as well as occurrence in specified properties of the collection description.

NOTE: This `query` parameter is not specified in OGC API - Records, and is distinct from `q` to avoid misinterpretation and make it possible to conform to both this requirements class as well as Records.

include::./requirements/searchable-collections/REQ_rc-query.adoc[]
include::./requirements/searchable-collections/REQ_searchable-query.adoc[]

[[searchable-limit-parameter]]
=== Parameter `limit`

The `limit` parameter limits the number of collections that can be returned in a response.

include::./requirements/searchable-collections/REQ_rc-limit-definition.adoc[]
include::./requirements/searchable-collections/REQ_searchable-limit-definition.adoc[]

include::./requirements/searchable-collections/REQ_rc-limit-response.adoc[]
include::./requirements/searchable-collections/REQ_searchable-limit-response.adoc[]

The number of collections returned depends on the server and the value of the `limit` parameter.

* The client can request a limit to the number of collections returned.
* The server may have a default value for the limit, and a maximum limit.
* If the server has any more results available than it returns (the number it returns is less than or equal to the requested/default/maximum limit) then the server will include a link to the next set of results.
* The client can request a limit to the number of collections returned.
* The server may have a default value for the limit, and a maximum limit.
* If the server has any more results available than it returns (the number it returns is less than or equal to the requested/default/maximum limit) then the server will include a link to the next set of results.

The server also has the option of limiting the size of the collections response.

include::./recommendations/searchable-collections/PER_rc-server-limit.adoc[]
include::./recommendations/searchable-collections/REC_searchable-limit-default-maximum.adoc[]

include::./recommendations/searchable-collections/PER_searchable-server-limit.adoc[]

Since many servers will place a limit on the size of their responses, clients should be prepared to handle a paged response even if they have not specified a `limit` parameter in their query.

The effect of the limit parameter is to divide the response into a number of pages. Each page (except for the last) contains the specified number of entities. The response contains the first page. Additional pages can be accessed through hyperlink navigation.

include::./requirements/searchable-collections/REQ_rc-next.adoc[]
include::./requirements/searchable-collections/REQ_searchable-next.adoc[]

Providing `prev` links supports navigating back and forth between pages, but depending on the implementation approach it may be too complex to implement.

include::./recommendations/searchable-collections/PER_rc-prev.adoc[]
include::./recommendations/searchable-collections/PER_searchable-prev.adoc[]

==== Paged Response

If the collections response does not contain all of the collection resources available from this server, then the client should be informed of that fact.

include::recommendations/searchable-collections/REC_rc-paged-response.adoc[]
include::recommendations/searchable-collections/REC_searchable-paged-response.adoc[]

The `numberMatched` property of the collections response indicates the number of Collection items included in the collections response. This may be a subset of the total set of collections hosted by the API. Selection of which collections to include in a subset is controlled through the <<bbox-parameter-requirements,`bbox`>>, <<datetime-parameter-requirements,`datetime`>> and other selection parameters provided by the client.

include::requirements/searchable-collections/REQ_rc-numberMatched.adoc[]
include::requirements/searchable-collections/REQ_searchable-numberMatched.adoc[]

The number of collection items included in a collections response may be a subset of the number matched. In that case, the `numberReturned` property of the collections response indicates the number of collection items returned in this "page" of the collections response.

include::requirements/searchable-collections/REQ_rc-numberReturned.adoc[]
include::requirements/searchable-collections/REQ_searchable-numberReturned.adoc[]

If the collections response contains a subset of the selected collection items (`numberReturned` is less than `numberMatched`) then the collections response should contain links for navigating to the rest of the collection items as described above.

[[searchable-belowScaleDenominator-parameter]]
=== Parameter `belowScaleDenominator`
[[searchable-below-sd-parameter]]
=== Parameter `below-sd`

The `belowScaleDenominator` parameter allows searching for collections with a native scale denominator that is more detailed than the specified value,
allowing to filter out low-resolution dataset not suitable for the intended purpose.
This corresponding property in the collection description is `minScaleDenomiantor`, which may also be related to a `minCellSize` property for gridded coverages.
The `below-sd` parameter allows searching for collections usable at the scale denominator specified,
allowing to filter out low-resolution datasets not suitable for the intended purpose.
The related property indicating the minimum suitable scale denominator in the collection description is `minScaleDenominator`, which may also be related to a `minCellSize` property for gridded coverages.

For example, `belowScaleDenominator=200000` would only match collections with data intended for a scale of 1:200,000 or larger (i.e., collections intended for 1:2,000,000 would be excluded).
For example, `below-sd=200000` would only match collections with data intended for a scale of 1:200,000 or larger (i.e., collections intended for 1:2,000,000 would be excluded).

include::./requirements/searchable-collections/REQ_rc-below-sd.adoc[]
include::./requirements/searchable-collections/REQ_searchable-below-sd.adoc[]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[per_collections_rc-prev]]
[[per_searchable_prev]]
[width="90%",cols="2,6a"]
|===
^|*Permission {counter:per-id}* |*/per/collections/rc-prev*
^|*Permission {counter:per-id}* |*/per/searchable/prev*
^|A |A response to a `next` link MAY include a `prev` link to the resource that included the `next` link.
|===
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[per_collections_rc-server-limit]]
[[per_searchable_server-limit]]
[width="90%",cols="2,6a"]
|===
^|*Permission {counter:per-id}* |*/per/collections/rc-server-limit*
^|*Permission {counter:per-id}* |*/per/searchable/server-limit*
^|A |If a server is configured with a maximum response size, then the server MAY page responses which exceed that threshold.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[rec_searchable_limit-default-maximum]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:req-id}* |*/rec/searchable/limit-definition*
^|A |The Implementation SHOULD advertise the default value for the `limit` parameter.
^|B |The Implementation SHOULD advertise the maximum value for the `limit` parameter.
|===
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[rec_collections_rc-paged-response]]
[[rec_searchable_paged-response]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/rec/collections/rc-paged-response*
^|*Recommendation {counter:rec-id}* |*/rec/searchable/paged-response*
^|A|If the number of items in the `collections` element is less than the number available through the API, then the `numberMatched` and `numberReturned` properties SHOULD be included in the Collections response.
|===
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[rec_collections_rc-server-limit]]
[[rec_collections_server-limit]]
[width="90%",cols="2,6a"]
|===
^|*Recommendation {counter:rec-id}* |*/rec/collections/rc-server-limit*
^|*Recommendation {counter:rec-id}* |*/rec/collections/server-limit*
^|A |Servers MAY limit the number of collections returned in a response.
|===

Expand Down
Empty file.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[req_searchable_rc-bbox-definition]]
[[req_searchable-bbox-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-bbox-definition*
^|*Requirement {counter:req-id}* |*/req/searchable/bbox-definition*
^|A|The `bbox` parameter SHALL possess the following characteristics (using an OpenAPI Specification 3.0 fragment):

[source,YAML]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[req_searchable_rc-bbox-response]]
[[req_searchable_bbox-response]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-bbox-response*
^|*Requirement {counter:req-id}* |*/req/searchable/bbox-response*
^|A|If the `bbox` parameter is provided by the client and supported by the server, then only collections that have a spatial extent that intersects the bounding box and collections that
do not describe a spatial extent SHALL be part of the result set.
|===
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[[req_searchable-below-sd]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/below-sd*
^|A|The Implementation SHALL support a `below-sd` parameter specified as numeric value for the `/collections` resource.
^|B|The Implementation SHALL NOT include in the response collections for which the `minScaleDenominator` property (or the equivalent conversion for `minCellSize` assuming 0.28mm/cell)
of the collection description is greater than the scale denominator specified in the `below-sd` parameter value.
^|C|Collections with an unknown `minScaleDenominator` (or equivalent `minCellSize`) SHALL be included in the response.
|===
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
[[req_searchable_rc-datetime-definition]]
[[req_searchable_datetime-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-datetime-definition*
^|A |The `datetime` parameter SHALL have the following characteristics (using an OpenAPI Specification 3.0 fragment):

[source,YAML]
----
name: datetime
in: query
required: false
schema:
type: string
style: form
explode: false
----

^|B |Temporal geometries are either a date-time value or a time interval. The parameter value SHALL conform to the following syntax (using link:https://tools.ietf.org/html/rfc5234[ABNF]):
^|*Requirement {counter:req-id}* |*/req/searchable/datetime-definition*
^|A |The Implementation SHALL support a `datetime` parameter consisting of a string specifying either a date-time value or a time interval.
^|B |The parameter value SHALL conform to the following syntax (using link:https://tools.ietf.org/html/rfc5234[ABNF]):

[source]
----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[req_searchable_rc-datetime-response]]
[[req_searchable_datetime-response]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-datetime-response*
^|*Requirement {counter:req-id}* |*/req/searchable/datetime-response*
^|A |If the `datetime` parameter is provided by the client and supported by the server, then only collections whose temporal extent intersects the interval or instant of the `datetime` parameter and collections that
do not describe a temporal extent SHALL be part of the result set.
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[req_searchable_limit-definition]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/limit-definition*
^|A |The Implementation SHALL support a `limit` parameter consisting of a positive integer greater or equal to 1.
The default value for this parameter is up to the server.
|===
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[[req_searchable_rc-limit-response]]
[[req_searchable-limit-response]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-limit-response*
^|*Requirement {counter:req-id}* |*/req/searchable/limit-response*
^|A |If the `limit` parameter is provided by the client and supported by the server, then the response SHALL NOT contain more collections than specified by the `limit` parameter.
^|B |If the API definition specifies a maximum value for the `limit` parameter, the response SHALL NOT contain more collections than this maximum value.
^|C |If the value of the `limit` parameter is larger than the maximum value, this SHALL NOT result in an error (instead the server's maximum value for the parameter SHALL be used).
|===
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[rec_searchable_rc-next]]
[[rec_searchable_next]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-next*
^|*Requirement {counter:req-id}* |*/req/searchable/next*
^|A |A `200`-response SHALL include a link to the next "page" (relation: `next`), if more resources have been selected than returned in the response.
^|B |Dereferencing a `next` link SHALL return additional resources from the set of selected resources that have not yet been returned.
^|C |The number of resources in a response to a `next` link SHALL follow the same rules as for the response to the original query and again include a `next` link, if there are more resources in the selection that have not yet been returned.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[reqsearchable_rc-numberMatched]]
[[reqsearchable_numberMatched]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-numberMatched*
^|*Requirement {counter:req-id}* |*/req/searchable/numberMatched*
^|A |If a property `numberMatched` is included in the response, the value SHALL be identical to the number of hosted collections that meet the selection parameters provided by the client.
^|B |A server MAY omit this information in a response, if the information about the number of matching resources is not known or difficult to compute.
|===
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[req_searchable_rc-numberReturned]]
[[req_searchable-numberReturned]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-numberReturned*
^|*Requirement {counter:req-id}* |*/req/searchable/numberReturned*
^|A |If a property `numberReturned` is included in the response, the value SHALL be identical to the number of items in the `collections` array in the `Collections` document.
^|B |A server MAY omit this information in a response, if the information about the number of resources in the response is not known or difficult to compute.
|===
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
[[req_searchable_rc-q]]
[[req_searchable_q]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-q*
^|A|The implementation SHALL support a `q` parameter with the following characteristics (using an OpenAPI Specification 3.0 fragment):

[source,YAML]
----
name: q
in: query
required: false
schema:
type: array
minItems: 1
items:
type: string
style: form
explode: false
----
^|*Requirement {counter:req-id}* |*/req/searchable/q*
^|A|The implementation SHALL support a `q` parameter consisting of one or more comma-separated strings of characters.
^|B|The implementation SHALL only return collections whose description matches at least one (logical OR) of the comma-separated items in the `q` array.
^|C|An item of the `q` array without white space SHALL be considered a match if the whole word appears at least once in the collection description.
^|D|An item of the `q` array consisting of multiple terms separated by white space SHALL be considered a match if the terms appears in the order specified in a particular property of the collection description,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[req_searchable_rc-query]]
[[req_searchable_query]]
[width="90%",cols="2,6a"]
|===
^|*Requirement {counter:req-id}* |*/req/searchable/rc-query*
^|*Requirement {counter:req-id}* |*/req/searchable/query*
^|A|The implementation SHALL support a `query` parameter with the following characteristics (using an OpenAPI Specification 3.0 fragment):

[source,YAML]
Expand Down

0 comments on commit 7969180

Please sign in to comment.