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

EDR Metadata can now be harmonized #373

Merged
merged 10 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ USER root
LABEL maintainer="[email protected]"

# Version should be same as in Definitions.h
LABEL version="2.21.2"
LABEL version="2.22.0"

# Try to update image packages
RUN apt-get -q -y update \
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**Version 2.22.0 2024-05-22**
- EDR: Parameters can now be detailed with metadata like standard_names and units: https://github.com/KNMI/adaguc-server/issues/359.
- See [Configure_EDR_service](doc/tutorials/Configure_EDR_service.md) for details.


**Version 2.21.2 2024-04-26**
- When using docker compose the Redis container now automatically starts when system restarts

Expand Down
2 changes: 1 addition & 1 deletion adagucserverEC/Definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#ifndef Definitions_H
#define Definitions_H

#define ADAGUCSERVER_VERSION "2.21.2" // Please also update in the Dockerfile to the same version
#define ADAGUCSERVER_VERSION "2.22.0" // Please also update in the Dockerfile to the same version

// CConfigReaderLayerType
#define CConfigReaderLayerTypeUnknown 0
Expand Down
15 changes: 15 additions & 0 deletions data/config/datasets/netcdf_5d.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<OgcApiEdr>
<EdrCollection name="data_5d" time_interval="R9/2017-01-01T00:25:00Z/PT5M" vertical_name="height">
<EdrParameter name="data" unit="unit"/>
<EdrParameter
name="data_extra_metadata"
unit="°C"
standard_name="air_temperature"
observed_property_label="Air temperature"
parameter_label="Air temperature, 2 metre" />

</EdrCollection>
</OgcApiEdr>

Expand Down Expand Up @@ -38,6 +45,14 @@

</Layer>

<Layer type="database">
<Name>data_extra_metadata</Name>
<Title>data_extra_metadata</Title>
<FilePath filter="^nc_5D_.*\.nc$">{ADAGUC_PATH}/data/datasets/netcdf_5dims</FilePath>
<Variable>data</Variable>
<Styles>testdata</Styles>

</Layer>

<!-- End of configuration /-->
</Configuration>
60 changes: 55 additions & 5 deletions doc/tutorials/Configure_EDR_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ This file is available in the adaguc-server repository with location `data/datas
Create the following file at the filepath `$ADAGUC_DATASET_DIR/edr.xml`. You can also consider changing `<FilePath>` to `/data/adaguc-data/*.nc`.

```xml
<?xml version="1.0" encoding="UTF-8" ?>

<Configuration>

<OgcApiFeatures/>
<OgcApiFeatures />

<OgcApiEdr>
<EdrCollection name="harmonie">
<EdrParameter name="air_temperature__at_2m" unit="Celsius"/>
<EdrParameter
name="air_temperature__at_2m"
unit="°C"
standard_name="air_temperature"
observed_property_label="Air temperature"
parameter_label="Air temperature, 2 metre" />
</EdrCollection>
</OgcApiEdr>

Expand All @@ -43,18 +48,63 @@ Create the following file at the filepath `$ADAGUC_DATASET_DIR/edr.xml`. You can
</Style>

<!-- Layers -->

<Layer type="database">
<FilePath>/data/adaguc-data/HARM_N25_20171215090000_dimx16_dimy16_dimtime49_dimforecastreferencetime1_varairtemperatureat2m.nc</FilePath>

<FilePath>
/data/adaguc-data/HARM_N25_20171215090000_dimx16_dimy16_dimtime49_dimforecastreferencetime1_varairtemperatureat2m.nc</FilePath>
<Variable units="Celsius">air_temperature__at_2m</Variable>
<Styles>temperature</Styles>
</Layer>

<!-- End of configuration /-->
</Configuration>

```


### EdrParameter settings

```xml
<EdrParameter
name="air_temperature__at_2m"
unit="°C"
standard_name="air_temperature"
observed_property_label="Air temperature"
parameter_label="Air temperature, 2 metre" />
```

- name: Mandatory, Should be one of the WMS Layer names as advertised in the WMS GetCapabilities
- unit: Mandatory, Sets the unit for the parameter in the parameter_names section of the collection document
- standard_name: Recommended, sets the observedProperty id. If set the id will contain a link to the vocabulary service. If not set, it will fallback to `name` and `observedProperty.id` will not contain a link.
- observed_property_label: Recommended, sets the observedProperty label, it will fallback to it will fallback first to `standard_name` first, and second to `name`
- parameter_label: Recommended, sets the label for the parameter in the parameter_names section, it will fallback to the `name`

For the given example this will result in the following parameter name definition:

```json
parameter_names": {
"air_temperature__at_2m": {
"type": "Parameter",
"id": "air_temperature__at_2m",
"label": "Air temperature, 2 metre",
"description": "harmonie - air_temperature__at_2m (air_temperature__at_2m)",
"unit": {
"symbol": {
"value": "°C",
"type": "http://www.opengis.net/def/uom/UCUM"
}
},
"observedProperty": {
"id": "https://vocab.nerc.ac.uk/standard_name/air_temperature",
"label": "Air temperature"
}
}
}
```

*The description is currently read from the GetCapabilities document, using the WMS Layer Title section prefixed with the edr collection name.


## Step 3: Scan the new data

```
Expand Down
Loading