-
-
Notifications
You must be signed in to change notification settings - Fork 314
Optionally allow for description metadata in EDR parameter responses #2233
Description
Is your feature request related to a problem? Please describe.
Currently the EDR code in pygeoapi uses id, title, and x-ogc-unit for populating all parameter metadata. This works, but sometimes you want to have both a shorter title but a longer description. However, pygeoapi does not set the description field for EDR parameters anywhere so this is currently not possible.
Describe the solution you'd like
It would be useful to add extra metadata info to the EDR parameter response to help when distinguishing parameters and/or adding extra context. In particular, supporting the field: description.
As context, in statement E of Requirement A.25: /req/edr/rc-parameters in the EDR spec it says:
A parameter object MAY have a member with the name “description” where the value SHALL be an i18n object which is a, perhaps lengthy, textual description of the parameter.
It would be useful to add an optional description: key here that sources from value["description"] if description is set on the value object, and otherwise omits it and leaves things as is.
pygeoapi/pygeoapi/api/__init__.py
Lines 1317 to 1335 in 5d01f16
| collection['parameter_names'][key] = { | |
| 'id': key, | |
| 'type': 'Parameter', | |
| 'name': value['title'], | |
| 'observedProperty': { | |
| 'label': { | |
| 'id': key, | |
| 'en': value['title'] | |
| }, | |
| }, | |
| 'unit': { | |
| 'label': { | |
| 'en': value['title'] | |
| }, | |
| 'symbol': { | |
| 'value': value['x-ogc-unit'], | |
| 'type': 'http://www.opengis.net/def/uom/UCUM/' # noqa | |
| } | |
| } |
Additional Info
descriptionis also used by other EDR clients like https://github.com/MetOffice/qgis-plugin-edr and would help improve UX with other EDR tooling- I am happy to submit a PR for this feature request