In order to activate the Vigicrues Xml import as a FEWS import, it is required to set up a TimeSeriesImportRun module configuration file and an accompanying IdMap file.

The import will expect the XML-file to use this schema (visited on 06-02-2018).  It will first search for the <Donnees> element (within the <hydrometrie> element), then search for the <Series> element (within the <Donnees> element). If either <Donnees> or <Series> is not found, no data will be imported. For each <Serie> element (within <Series>), it will use the <CdStationHydro>, <CdSiteHydro> or <CdCapteur> element (only one of the three will be present) as the externalLocationId and the <GrdSerie> element as the externalParameterId. Within the <Serie> element, it will then search for an <ObssHydro> element and read the times and values from each <DtObsHydro> and <ResObsHydro> element respectively, for each <ObsHydro> element in the <ObssHydro> element. 

Example Import configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
<!-- This is an example import configuration file for importing Vigicrues data from an xml-file -->
<import>
    <general>
		<importType>Vigicrues_xml</importType>
		<folder>$IMPORT_FOLDER$/XML</folder>
		<fileNamePatternFilter>*.xml</fileNamePatternFilter>
		<failedFolder>$IMPORT_FAILED_FOLDER$</failedFolder>
		<backupFolder>$IMPORT_BACKUP_FOLDER$</backupFolder>
		<idMapId>IdImportVigicruesXml</idMapId>
	</general>
    <timeSeriesSet>
       <moduleInstanceId>ImportVigicrues</moduleInstanceId>
       <valueType>scalar</valueType>
       <parameterId>Q.obs</parameterId>
       <locationSetId>VigicruesSet</locationSetId>
       <timeSeriesType>external historical</timeSeriesType>
       <timeStep unit="hour" multiplier="1"/>
       <readWriteMode>add originals</readWriteMode>
    </timeSeriesSet>
</import>
</timeSeriesImportRun>

Example IdMap file:

<?xml version="1.0" encoding="UTF-8"?>
<idMap version="1.1" xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/idMap.xsd">
 <!--
    map internal timeseries directly to external timeseries
    externalLocation should be set to CdStationHydro, CdSiteHydro or CdCapteur
    externalParameter should be set to GrdSerie
 -->
 
<map internalLocation="Vigicrues_xml_1" internalParameter="Q.obs" externalLocation="L800001020" externalParameter="Q" />
<map internalLocation="Vigicrues_xml_2" internalParameter="Q.obs" externalLocation="B463101001" externalParameter="Q" />
 
</idMap>

  • No labels