Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default values for query parameters #215

Closed
cportele opened this issue May 13, 2019 · 1 comment · Fixed by #218
Closed

Default values for query parameters #215

cportele opened this issue May 13, 2019 · 1 comment · Fixed by #218
Assignees
Labels
OGC API: Features Issue related to feature resources (see #190) Part 1: Core Issue related to Part 1 - Core progress: pull request available

Comments

@cportele
Copy link
Member

Currently the default values for query parameters on a feature collection (bbox, datetime or any additional filter parameter) is always to select all features.

In some cases, a different behavior would be more appropriate. An example identified in the Testbed-14 Complex Feature Handling work were collections where the features are versions of a real-world entity, each valid for a given time interval - without overlaps between the time intervals. In this case, it would be more natural, if by default the value of datetime would be "now" so one fetches the current snapshot/situation.

In other types of datasets a default bbox or default values for filter parameters on string values might be useful, too.

This could be addressed in at least two ways:

  • Define default values in the OpenAPI definition of the parameters plus in the collection metadata. If no default values are provided the current behavior would apply (all features are selected).
  • Another approach could be to not use default values, but add sufficient information in the collection metadata so that clients can always add explicit query parameters for the type of collection. That is, in the example above, clients would always add an explicit datetime parameter, if they want to fetch only features for a certain snapshot of the dataset.
@cportele cportele added progress: ready for discussion OGC API: Features Issue related to feature resources (see #190) labels May 13, 2019
@cportele cportele added this to the Part 1, Second Draft Release milestone May 13, 2019
@cportele cportele added the Part 1: Core Issue related to Part 1 - Core label May 20, 2019
@cportele cportele self-assigned this May 20, 2019
@cportele
Copy link
Member Author

20-MAY-2019 Conference call: We probably do not want to preclude that implementations can use default values. We just need to check that we do not prohibit that an API definition includes default values for the parameters. Clemens to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OGC API: Features Issue related to feature resources (see #190) Part 1: Core Issue related to Part 1 - Core progress: pull request available
Projects
Development

Successfully merging a pull request may close this issue.

1 participant