Introduction
MeteoAlarmCap is a XML export format following the Common Alerting Protocol standard: http://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html . The export is used for http://www.rijkswaterstaat.nl/kaarten/waterstand-tov-nap.aspx.
MeteoAlarmCap Export Configuration
The configuration of the MeteoAlarmCap export module is shown in the following example.
The following are the required properties that have to be configured:
- meteo-alarm-soap-service : the url of the soap service to post the cap files to. For example: http://www.meteoalarm.eu:8080/functions/webservices/capimport.php?wsdl
- dolibarrkey: key needed by the soap service
- username: username needed by the soap service
- password: password needed by the soap service
- area-code
The area code is one of the following codes that should be available as externalLocationId in the idMap (only one code is required if a locationset is configured in the timeseriesset):
- "GR" (Groningen)
- "FL" (Flevoland)
- "ZH" (Zuid-Holland)
- "ZE" (Zeeland)
- "NH" (Noord-Holland)
- "LB" (Limburg)
- "NB" (Noord-Brabant)
- "GL" (Gelderland)
- "UT" (Utrecht)
- "OV" (Overijssel)
- "FR" (Friesland)
- "DR" (Drenthe)
- "WAE" (Waddeneilanden)
- "WAD" (Waddenzee)
- "IJG" (IJsselmeergebied)
The following properties are optional and can be used to change the default values. The default values are given:
- "status" : "Test"
- "source" : "KNMI"
- "scope" : "Public"
- "certainty" : "Likely"
- "category" " "Met"
- "sender" : "http://www.knmi.nl/nederland-nu/weer/waarschuwingen"
- "sender-name" : "KNMI Koninklijk Nederlands Meteorologisch Instituut"
- "contact" : "informatiecentrum@knmi.nl"
- "urgency" : "Future"
- "awareness-type" : "12"
The following awareness-types are supported:
"00" : "1; wind"
"01" : "10; rain";
"02": "2; snow-ice"
"03" : "3; thunderstorm"
"07" : "4; fog"
"12" : "12; flooding"
"16" : "5; high-temperature"
"17" : "6; low-temperature"
For exporting description and instruction the MeteoalarmCap export relies on location attributes.
<locationSet id="meteoalarm"> <csvFile> <file>meteoalarm</file> <geoDatum>WGS 1984</geoDatum> <id>%ID%</id> <name>%NAME%</name> <x>%X%</x> <y>%Y%</y> <attribute id="Green_DES_NL"> <text>%Green_DES_NL%</text> </attribute> <attribute id="Green_DES_EN"> <text>%Green_DES_EN%</text> </attribute> <attribute id="Green_INS_NL"> <text>%Green_INS_NL%</text> </attribute> <attribute id="Green_INS_EN"> <text>%Green_INS_EN%</text> </attribute> <attribute id="Yellow_DES_NL"> <text>%Yellow_DES_NL%</text> </attribute> <attribute id="Yellow_DES_EN"> <text>%Yellow_DES_EN%</text> </attribute> <attribute id="Yellow_INS_NL"> <text>%Yellow_INS_NL%</text> </attribute> <attribute id="Yellow_INS_EN"> <text>%Yellow_INS_EN%</text> </attribute> <attribute id="Orange_DES_NL"> <text>%Orange_DES_NL%</text> </attribute> <attribute id="Orange_DES_EN"> <text>%Orange_DES_EN%</text> </attribute> <attribute id="Orange_INS_NL"> <text>%Orange_INS_NL%</text> </attribute> <attribute id="Orange_INS_EN"> <text>%Orange_INS_EN%</text> </attribute> <attribute id="Red_DES_NL"> <text>%Red_DES_NL%</text> </attribute> <attribute id="Red_DES_EN"> <text>%Red_DES_EN%</text> </attribute> <attribute id="Red_INS_NL"> <text>%Red_INS_NL%</text> </attribute> <attribute id="Red_INS_EN"> <text>%Red_INS_EN%</text> </attribute> </csvFile> </locationSet>
The csv file might look as follows:
ID;NAME;X;Y;REL_LOBITH;REL_EIJSDEN;Green_DES_NL;Green_INS_NL;Green_DES_EN;Green_INS_EN;Yellow_DES_NL;Yellow_INS_NL;Yellow_DES_EN;Yellow_INS_EN;Orange_DES_NL;Orange_INS_NL;Orange_DES_EN;Orange_INS_EN;Red_DES_NL;Red_INS_NL;Red_DES_EN;Red_INS_EN DR;Drenthe;6.55;52.98;FALSE;FALSE;Alles is normaal;Niets doen;Everything is normal;Do nothing;Not so fine;Check website;Not so fine;Check website;Be careful;Ready for packing;Be careful;Ready for packing;We are in danger;Run;We are in danger;Run FL;Flevoland;5.47;52.5;FALSE;FALSE;Alles is normaal;Niets doen;Everything is normal;Do nothing;Not so fine;Check website;Not so fine;Check website;Be careful;Ready for packing;Be careful;Ready for packing;We are in danger;Run;We are in danger;Run
As MeteoAlarmCap can generate multiple CAP files per forecast, 'exportFileName' create a folder that includes all exported CAP files. 'exportFileName' should be different for each export (e.g. each RWSoS system).
<?xml version="1.0" encoding="UTF-8"?> <timeSeriesExportRun 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/timeSeriesExportRun.xsd"> <export> <general> <exportType>MeteoAlarmCap</exportType> <folder>$EXPORT_FOLDER$/MeteoAlarm</folder> <exportFileName> <name>meteoAlarmOv.xml</name> </exportFileName> <idMapId>idMeteoAlarm</idMapId> </general> <properties> <string key="area-code" value="OV" ></string> </properties> <exportAttribute internalAttributeId="Green_DES_NL" externalAttributeId="Green_DES_NL"></exportAttribute> <exportAttribute internalAttributeId="Green_INS_NL" externalAttributeId="Green_INS_NL"></exportAttribute> <exportAttribute internalAttributeId="Green_DES_EN" externalAttributeId="Green_DES_EN"></exportAttribute> <exportAttribute internalAttributeId="Green_INS_EN" externalAttributeId="Green_INS_EN"></exportAttribute> <exportAttribute internalAttributeId="Yellow_DES_NL" externalAttributeId="Yellow_DES_NL"></exportAttribute> <exportAttribute internalAttributeId="Yellow_INS_NL" externalAttributeId="Yellow_INS_NL"></exportAttribute> <exportAttribute internalAttributeId="Yellow_DES_EN" externalAttributeId="Yellow_DES_EN"></exportAttribute> <exportAttribute internalAttributeId="Yellow_INS_EN" externalAttributeId="Yellow_INS_EN"></exportAttribute> <exportAttribute internalAttributeId="Orange_DES_NL" externalAttributeId="Orange_DES_NL"></exportAttribute> <exportAttribute internalAttributeId="Orange_INS_NL" externalAttributeId="Orange_INS_NL"></exportAttribute> <exportAttribute internalAttributeId="Orange_DES_EN" externalAttributeId="Orange_DES_EN"></exportAttribute> <exportAttribute internalAttributeId="Orange_INS_EN" externalAttributeId="Orange_INS_EN"></exportAttribute> <exportAttribute internalAttributeId="Red_DES_NL" externalAttributeId="Red_DES_NL"></exportAttribute> <exportAttribute internalAttributeId="Red_INS_NL" externalAttributeId="Red_INS_NL"></exportAttribute> <exportAttribute internalAttributeId="Red_DES_EN" externalAttributeId="Red_DES_EN"></exportAttribute> <exportAttribute internalAttributeId="Red_INS_EN" externalAttributeId="Red_INS_EN"></exportAttribute> <timeSeriesSet> <moduleInstanceId>ModuleInstanceId</moduleInstanceId> <valueType>scalar</valueType> <parameterId>Q</parameterId> <locationId>73</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="minute" multiplier="15"/> <readWriteMode>read complete forecast</readWriteMode> <synchLevel>1</synchLevel> <ensembleId>main</ensembleId> <ensembleMemberIndex>0</ensembleMemberIndex> </timeSeriesSet> </export> </timeSeriesExportRun>
The following code shows a sample output file:
<?xml version="1.0" encoding="UTF-8"?> <alert xmlns="urn:oasis:names:tc:emergency:cap:1.2"> <identifier>2.49.0.0.528.0.NL.180214155054.FL_OV</identifier> <sender>http://www.knmi.nl/nederland-nu/weer/waarschuwingen</sender> <sent>2018-02-15T14:48:17+00:00</sent> <status>Test</status> <msgType>Alert</msgType> <source>KNMI</source> <scope>Public</scope> <info> <language>ne-NL</language> <category>Met</category> <event>awareness_type=12,awareness_level=1</event> <responseType>None</responseType> <urgency>Future</urgency> <severity>Minor</severity> <certainty>Likely</certainty> <effective>2007-12-09T00:00:00+00:00</effective> <onset>2007-12-09T23:00:00+00:00</onset> <expires>2007-12-09T23:59:59+00:00</expires> <senderName>KNMI Koninklijk Nederlands Meteorologisch Instituut</senderName> <headline>Flooding - Geen waarschuwingen voor Overijssel - Nederland</headline> <web>http://meteoalarm.eu/ne-NL/0/0/NL016-Overijssel.html</web> <contact>informatiecentrum@knmi.nl</contact> <parameter> <valueName>awareness_type</valueName> <value>12; flooding</value> </parameter> <parameter> <valueName>awareness_level</valueName> <value>1; green; Minor</value> </parameter> <area> <areaDesc>desc_NL016</areaDesc> <geocode> <valueName>EMMA_ID</valueName> <value>NL016</value> </geocode> </area> </info> </alert>