Page tree
Skip to end of metadata
Go to start of metadata

Function:

Functionality to define related locations and how to use them in your configuration

Where to Use?

Locations, LocationSets, Filters, DisplayGroups, Transformations

Why to Use?

To be able to simply relate series of several locations to each other, e.g. water levels to a weir, raingauge to a catchment etc.

Description:

Based on the DBF shape file or locations.xml you can easily manage the configuration

Available since:

Delft-FEWS 201101

Contents

Overview

This functionality enables linking time series between locations, without copying data or whatsoever. It can be done both in the user interface (filters and displayGroups in the FEWS Explorer) and in the transformations.
Typical examples of this functionality are:

  • relate the nearest rain gauge time series to a catchment or fluvial gauge
  • relate water level gauges to structures: like upstream and downstream water levels to several gates.

If you relate for example a rain gauge to a list of fluvial gauges, it will look in the filters like that the location has rainfall time series as parameter. Once you select this parameter and location to make a graph, you see that you get the rainfall time series displayed at the original rain gauge.

How to use

Some remarks:

  • in timeSeriesSets you always should be sure to use the locationRelationId only if the locationRelationId is defined for all locations in the locationSet. It is not allowed to have an undefined or empty locationRelationId. In that case a configuration error will occur. It is easy to do: add a relatedLocationExists constraint to the locationSet.
  • in transformations you can easily connect series from one location to another. If you have for example a weir with two gates, you can defined the upstream and downstream water level gauges as relatedLocations, but you refer to them through each gate.

Examples

Locations.xml

This example shows how to configure related locations in the Locations.xml configuration file. The upstream and downstream waterlevel gauges are related to the two weir gate locations. Notice that the namespace relatedLocationId should be added to the XML definition.

<locations xmlns="http://www.wldelft.nl/fews" version="1.1" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlns:relatedLocationId="http://www.wldelft.nl/fews/relatedLocationId" 
                xmlns:numberAttribute="http://www.wldelft.nl/fews/numberAttribute"
                xmlns:textAttribute="http://www.wldelft.nl/fews/textAttribute"
                xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/locations.xsd">
  <geoDatum>Rijks Driehoekstelsel</geoDatum>
  <location id="weir_gate1">
    <parentLocationId>weir</parentLocationId>
    <x>0</x>
    <y>0</y>
    <relatedLocationId:H_US>weir_h_us</relatedLocationId:H_US>
    <relatedLocationId:H_DS>weir_h_ds</relatedLocationId:H_DS>
  </location>
  <location id="weir_gate2">
    <parentLocationId>weir</parentLocationId>
    <x>0</x>
    <y>0</y>
    <relatedLocationId:H_US>weir_h_us</relatedLocationId:H_US>
    <relatedLocationId:H_DS>weir_h_ds</relatedLocationId:H_DS>
  </location>
  <location id="weir_h_us">
    <parentLocationId>weir</parentLocationId>
    <x>0</x>
    <y>0</y>
  </location>
  <location id="weir_h_ds">
    <parentLocationId>weir</parentLocationId>
    <x>0</x>
    <y>0</y>
  </location>
  <location id="weir">
    <x>0</x>
    <y>0</y>
    <relatedLocationId:METEO>meteo_station</relatedLocationId:METEO>
  </location>
  <location id="meteo_station">
    <x>0</x>
    <y>0</y>
  </location>
....

LocationSets.xml

This example shows how to define related locations if you use a DBF file to define the locations.

<locationSet id="my_locations">
  <esriShapeFile>
    <file>myLocDBF</file>
    <geoDatum>Rijks Driehoekstelsel</geoDatum>
    <id>%ID%</id>
    <name>%NAME%</name>
    <description>%TYPE%</description>
    <parentLocationId>%PARENT_ID%</parentLocationId>
    <x>%X%</x>
    <y>%Y%</y>
    <relation id="METEO">
      <relatedLocationId>%METEO%</relatedLocationId>
    </relation>
    <relation id="H_US">
      <relatedLocationId>%H_US%</relatedLocationId>
    </relation>
    <relation id="H_DS">
      <relatedLocationId>%H_DS%</relatedLocationId>
    </relation>
    <attribute id="regio">
      <text>%REGIO%</text>
    </attribute>
    <attribute id="type">
      <text>%TYPE%</text>
    </attribute>
    ...
  </esriShapeFile>
  <constraints>
    <relatedLocationExists locationRelationId="METEO"/>
    <relatedLocationExists locationRelationId="H_US"/>
    <relatedLocationExists locationRelationId="H_DS"/>
  </constraints>
</locationSet>

timeSeriesSets (in Filters, DisplayGroups and Transformations)

This example shows how you link to a related location in the timeSeriesSet. This can be done in the filters, displayGroups and Transformations only.

<timeSeriesSet>
  <moduleInstanceId>ImportCAW</moduleInstanceId>
  <valueType>scalar</valueType>
  <parameterId>P.meting</parameterId>
  <locationRelationId>METEO</locationRelationId>
  <locationSetId>my_locations</locationSetId>
  <timeSeriesType>external historical</timeSeriesType>
  <timeStep unit="nonequidistant"/>
  <readWriteMode>add originals</readWriteMode>
  <synchLevel>1</synchLevel>
</timeSeriesSet>

Transformation to compute flows at a weir

This example shows a transformation (from the new TransformationModule) that computes the flows over the two weir gates, by using the upstream and downstream water level gauges. By using the relatedLocations, this can be set up very easily in only one transformation.

<transformation id="compute flows at weirs">
  <structure>
    <generalWeirVariableHeight>
      <headLevel>
        <timeSeriesSet>
          <moduleInstanceId>Import</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>H.obs</parameterId>
          <locationRelationId>H_US</locationRelationId>
          <locationId>weir_gate1</locationId>
          <locationId>weir_gate2</locationId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="hour"/>
          <relativeViewPeriod unit="day" start="-365" end="0" startOverrulable="true"/>
          <readWriteMode>read only</readWriteMode>
        </timeSeriesSet>
      </headLevel>
      <tailLevel>
        <timeSeriesSet>
          <moduleInstanceId>Import</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>H.obs</parameterId>
          <locationRelationId>H_DS</locationRelationId>
          <locationId>weir_gate1</locationId>
          <locationId>weir_gate2</locationId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="hour"/>
          <relativeViewPeriod unit="day" start="-365" end="0" startOverrulable="true"/>
          <readWriteMode>read only</readWriteMode>
        </timeSeriesSet>
      </tailLevel>
      <height>
        <timeSeriesSet>
          <moduleInstanceId>Import</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>H.obs.crest</parameterId>
          <locationId>weir_gate1</locationId>
          <locationId>weir_gate2</locationId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="hour"/>
          <relativeViewPeriod unit="day" start="-365" end="0" startOverrulable="true"/>
          <readWriteMode>read only</readWriteMode>
        </timeSeriesSet>
      </height>
      <coefficientSet>
        <width>1</width>
        <freeFlowLimitCoefficient>1</freeFlowLimitCoefficient>
        <freeDischargeCoefficient>1</freeDischargeCoefficient>
        <drownedDischargeCoefficient>1</drownedDischargeCoefficient>
      </coefficientSet>
      <discharge>
        <timeSeriesSet>
          <moduleInstanceId>Flows</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>Q.calculated</parameterId>
          <locationId>weir_gate1</locationId>
          <locationId>weir_gate2</locationId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="hour"/>
          <relativeViewPeriod unit="day" start="-365" end="0" startOverrulable="true"/>
          <readWriteMode>add originals</readWriteMode>
          <synchLevel>1</synchLevel>
        </timeSeriesSet>
      </discharge>
    </generalWeirVariableHeight>
  </structure>
</transformation>
  • No labels