Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

{
"@odata.context": "https://ddapi.water.nl/v3/odata/$metadata#observations",
"value": [
{
"Id": "a4f6af36-6300-49b4-a579-b1aba70e3288",
"Type": "CoverageJSON",
"ResultTime": "2013-01-01T12:30:00Z",
"PhenomenonTime": {
"BeginPosition": "2013-01-01T12:30:00Z",
"EndPosition": "2013-01-06T12:30:00Z"
},
"ValidTime": {
"BeginPosition": "2013-01-01T12:30:00Z"
},
"Parameter": {
"Quantity": "WATHTE",
"MeasurementDevice": "Druksensor",
"ObservationType": "WNS9040",
"Capacity": "NAP",
"Compartment": "GW"
},
"Metadata": {
"WellProperties": {
"SurfaceLevel": 2.45,
"WellDepth": 15.0,
"FilterTop": -12.0,
"FilterBottom": -13.0,
"TubeType": "HDPE",
"TubeDiameter": 0.032
}
},
"Foi": {
"Id": "GWLICHAAM_ZAND_MS_01",
"Code": "AMSRK_0001",
"Description": "DIEMZDK",
"Geography@odata.type": "#GeographyPoint",
"Geography": {
"Type": "Point",
"Coordinates": [
5.00166,
52.34331
]
}
},
"Result": {
"id": "a4",
"type": "Coverage",
"domain": {
"type": "Domain",
"domainType": "PointSeries",
"axes": {
"x": {
"values": [
-10.1
]
},
"y": {
"values": [
-40.2
]
},
"t": {
"values": [
"2013-01-01",
"2013-01-02",
"2013-01-03",
"2013-01-04",
"2013-01-05",
"2013-01-06"
]
}
},
"referencing": [
{
"coordinates": [
"x",
"y"
],
"system": {
"type": "GeographicCRS",
"id": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
}
},
{
"coordinates": [
"t"
],
"system": {
"type": "TemporalRS",
"calendar": "Gregorian"
}
}
]
},
"parameters": {
"WNS9040": {
"type": "Parameter",
"description": {
"en": "[] [WATHTE] [] [m] [NAP] [GW]"
},
"unit": {
"symbol": "m"
}
},
"quality": {
"type": "Parameter",
"description": {
"en": "Judgement of quality of datapoint"
},
"observedProperty": {
"id": "oajsfgiujhsagffpoiuahgfpih",
"label": {
"en": "Judgement of quality of datapoint"
}
}
}
},
"ranges": {
"WNS9040": {
"type": "NdArray",
"dataType": "float",
"axisNames": [
"t"
],
"shape": [
6
],
"values": [
43.9599,
43.9599,
43.9640,
43.9640,
43.9679,
43.9879
]
},
"quality": {
"type": "NdArray",
"dataType": "string",
"axisNames": [
"t"
],
"shape": [
6
],
"values": [
"VALID",
"INVALID",
"VALID",
"UNKNOWN",
"UNKNOWN",
"UNKNOWN"
]
}
}
}
}
],
"@odata.nextLink": "https://ddapi.water.nl/v3/odata/observations"
}


Qualifiers and addition Parameter/XXX filtering


Since build patches with number 609110736 and higher, (external) qualifiers are also used for extra url request filtering options.

 

To support this, FEWS will use qualifiers to extend the URL request with extra Parameter/XXX filters. This way any other Parameter/XXX filter will be supported as well.

For each (external) qualifier id of the FEWS time series a prefix will define the exact Parameter/XXX and the rest of the qualifier defines the value. 

The (external) qualifier id must match the next format: <prefix>_<value>

For each (external) qualfier id the url request is extended with 

 and Parameter/<prefix> eq '<value>'

Example water quantity

 

A FEWS time series with external FEWS-parameter “WNS9040” and only one external FEWS-qualifer: “MeasurementDevice_Handmeting” will lead to 

Parameter/ObservationType eq ‘WNS9040’ and Parameter/MeasurementDevice eq ‘Handmeting’

 

While a FEWS time series with external FEWS-parameter “WNS9040” and only one external FEWS-qualifer: “MeasurementDevice_Peilbuis” will lead to

Parameter/ObservationType eq ‘WNS9040’ and Parameter/MeasurementDevice eq ‘Peilbuis’


It can well be that for this use case within FEWS two internal parameters are being used without an internal qualifier. This can be solved in id mapping as follows:

<parameter internal="GW.hand" external="WNS9040" externalQualifier="MeasurementDevice_Handmeting"/>

<parameter internal="GW.peil" external="WNS9040" externalQualifier="MeasurementDevice_Peilbuis"/>

 

Example water quality

 

Cases with mutliple qualifiers are supported as well:

For example, a FEWS time series with external FEWS-parameter “WNS12345” and external FEWS-qualifers: “Gender_Male” & “LengthClass_Small” will lead to the next part of the request:

Parameter/ObservationType eq ‘WNS12345’ and Parameter/Gender eq ‘Male’ and Parameter/LengthClass eq ‘Small’

 

 This can be solved via an externalQualfierFunction in the id mapping:

<qualifierIdFunction externalQualifierFunction="@ExternalQualifierId@"/>

 

Where in Qualfiers.xml the externalQualifierId can be defined as follows:

 <csvFile>

    <file>LenghtClass.csv</file>
    <id>LC_%fewsid%</id>
    <name>%name%</name>
    <group>LengthClass</group>
    <attribute id="ExternalQualifierId">
       <text>LengthClass_%Codes%</text>
    </attribute>

</csvFile>

 

<csvFile>
    <file>Gender.csv</file>
    <id>GD_%fewsid%</id>
    <name>%name%</name>
    <group>Gender</group>
    <attribute id="ExternalQualifierId">
       <text>Gender_%Codes%</text>
    </attribute>

</csvFile>