opengeospatial / ogcapi-coverages

OGC API - Coverages draft specification
https://ogcapi.ogc.org/coverages
Apache License 2.0
22 stars 13 forks source link

Subsetting categorical values. #195

Open joanma747 opened 1 month ago

joanma747 commented 1 month ago

In this request we are considering a use case where "species" ( coordinates are: "wildcat", "ants", "frog, "wolf",...) is not a property but a dimension. The property will be the number of occurrences.

In Common Req /req/umd-collection/extent-uad-definition part J the existance of categorical axes is suggest. We could extent the definition

However with the current subset syntax is not possible to extract a arbitrary list of categorical coordinates. The cited requirement suggest that is possible to use the order they were defined to get a "continguous subset" but what about and arbitrary list.

Imagine you have a axis that is species and you want to subset "wildcat" and "wolf" to create a "mammal" coverage with the bands "wildcat" and "wolf" that are not contiguos in their definition. How to do this?.

joanma747 commented 1 month ago

This is the solution:

A: The coverage request operation SHALL support a parameter subset to subset one or more of the dimensions of the coverage (as described in the collection information) with the following characteristics (using an Extended Backus Naur Form (EBNF) fragment):

SubsetSpec = "subset" "=" axisName "(" intervalOrSingle ")" intervalOrSingle = interval / single / list interval = low ":" high list = single ("," single) low = single high = single single = number / text / "" number = 1DIGIT text = DQUOTE 1(%x20-21 / %x23-7E) DQUOTE

We need to say that a : or , need to be escaped.

chris-little commented 1 month ago

@joanma747 @jerstlouis In OGC API-EDR V1.1 we support categorical dimensions. We opted to define the single and list subsets.