scrollbar |
---|
...
Table of Contents |
---|
Input
- input
Coefficient set
- interpolationType
- extrapolationType
- inputUnit (optional, since 2016.02)
- outputUnit (optional, since 2016.02)
- lookupTable (choice)
- lookupTableRow
- locationId / inputParameterId / outputParameterId / qualifierId (since 2017.02)
Output
- output
Description
The output will be calculated using a simple table lookup with the input value. The output value will be calculated by interpolation or extrapolation in the lookup table. The type of
...
The options available are:
- notAllowed,
- maxMin,
- linear
- class
If the first option, notAllowed, is configured an input value outside the range will return a missing value. The second option will return the minimum value or the maximum value in the lookup table. The third option linear enables the extrapolation for the function.
...
units configured in the parameters.xml
Lookup using table directly specified in transformation config
Code Block | ||||
---|---|---|---|---|
| ||||
<transformation id="simpleTableLookup">
<lookup>
<simple>
<input>
<variableId>H1</variableId>
</input>
<coefficientSet>
<interpolationType>linear</interpolationType>
<extrapolationType>extrapolate</extrapolationType>
<inputUnit>m</inputUnit>
<outputUnit>mm</outputUnit>
<lookupTable>
<lookupTableRow input="1.8" output="4000"/>
<lookupTableRow input="2.0" output="6000"/>
<lookupTableRow input="2.2" output="8000"/>
<lookupTableRow input="2.4" output="10000"/>
<lookupTableRow input="2.6" output="12000"/>
<lookupTableRow input="2.8" output="14000"/>
<lookupTableRow input="3.0" output="16000"/>
<lookupTableRow input="3.2" output="18000"/>
<lookupTableRow input="3.4" output="20000"/>
<lookupTableRow input="3.6" output="22000"/>
</lookupTable>
</coefficientSet>
<output>
<variableId>H2</variableId>
</output>
</simple>
</lookup>
</transformation>
|
In case of class interpolation we look at which input threshold (lower or higher) the value is closest to, and the output responding to that threshold will be the output. Using the example below it mean for an input 0 the output will be 0, for input 160 output will be 2, for input 499 output will be 5. When the input falls exactly between the two thresholds, it will be rounded up, so for input 500 the output will be 6.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<transformation id="ClassInterpolation"> <lookup> <simple> <input> <variableId>variable1</variableId> </input> <coefficientSet> <interpolationType>class</interpolationType> <extrapolationType>extrapolate</extrapolationType> <lookupTable> <lookupTableRow input="0" output="0"/> <lookupTableRow input="10" output="1"/> <lookupTableRow input="150" output="2"/> <lookupTableRow input="250" output="3"/> <lookupTableRow input="350" output="4"/> <lookupTableRow input="450" output="5"/> <lookupTableRow input="550" output="6"/> </lookupTable> </coefficientSet> <output> <variableId>variable2</variableId> </output> </simple> </lookup> |
Lookup using LookupTables.xml from RegionConfigFiles
Since 2017.02 it is possible to use LookupTables.xml from RegionConfig by referencing with locationId, inputParameterId & outputParameterId
Code Block | ||||
---|---|---|---|---|
| ||||
<transformation id="simpleTableLookup"> <lookup> <simple> <input> <variableId>H1</variableId> </input> <coefficientSet> <interpolationType>linear</interpolationType> <extrapolationType>extrapolate</extrapolationType> <lookupTable> <piTable> <locationId>H-2002</locationId> <inputParameterId>H.m</inputParameterId> <outputParameterId>H.obs</outputParameterId> </piTable> </lookupTable> </coefficientSet> <output> <variableId>H2</variableId> </output> </simple> </lookup> </transformation> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <Tables xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_tables.xsd"> <table> <header> <locationId>H-2002</locationId> <a parameterId="H.m" units="m"/> <b parameterId="H.obs" units="m"/> <startDate date="2012-01-01" time="00:00:00"/> </header> <table> <row a="99" b="122.566570633982"/> <row a="158" b="216.30059062327"/> <row a="160" b="218.698850750015"/> <row a="162" b="221.058958199806"/> <row a="164" b="223.381719470149"/> <row a="166" b="225.667911902593"/> <row a="168" b="227.91859175558"/> <row a="170" b="230.884412887021"/> <row a="172" b="233.920464645294"/> <row a="174" b="237.492498877315"/> </table> </table> </Tables> |
When 'b' needs to be looked up by 'a' ->
<locationId> of the PiTable
<inputParameterId1> => 'a'
<outputParameterId> => 'b'