The OPW API is a programming interface provided by the Irish Office of Public Works. Data on their site are licensed under the Reuse of Public Sector Information License, PSI General Licence No.: 2005/08/01 http://psi.gov.ie/files/2010/03/PSI-Licence.pdf

For accessing the OPW server no login credentials are required. However when using automated imports it is requested to limit the number of requests to the server.

As a courtesy, the OPW request that you inform them at this email address of your intention to access the data in this way, and of the IP address and URL of your server(s): waterlevel@opw.ie

The OPW import makes use of the FEWS custom import mechanism described in Custom import formats. The OPW server import offers the ServerParser:

  • OpwTimeSeriesServerParser.java

The server parser interacts with the OPW programming interface as described on their website OPW API description

A list of available station identifiers and the sensors numbers that are available at each station can be found here: http://waterlevel.ie/last/

FEWS configuration

In order to activate the OPW Server import as a FEWS import, it is required to setup a TimeSeriesImportRun module configuration file and an accompanying IdMap file.

Example Import configuration file for the OPW service:

Example import configuration
 <?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 timeseries data from the OPW server -->
<import>
    <general>
        <parserClassName>nl.wldelft.timeseriesparsers.OpwTimeSeriesServerParser</parserClassName>
        <!--
            The format for an OPW data request is as follows:
            http://waterlevel.ie/data/<period>/<station_num>_<sensor_num>.csv
             
            where:
            period      = day, week or month. These values are fixed. If the period is added to the serverUrl then the value 
            of the relativeViewPeriod will be ignored. If the period is not added to the serverUrl then the value of the 
            relativeViewPeriod will be converted to either; day, week, or month.             
            station_num = Station identifier. This corresponds to the Location Id. This is a 5 digit number. 
            sensor_num  = Sensor identifier. This corresponds to the Parameter Id. This is either a 4 digit number or case 
            sensitive e.g. OD
        -->
        <serverUrl>http://waterlevel.ie/data/</serverUrl>
        <!-- 
           The relative view period will always be converted to one of the following values; day, week or month.
        -->
        <relativeViewPeriod unit="hour" start="-5" end="0" startOverrulable="true" endOverrulable="true"/>
        <idMapId>IdImportOpc</idMapId>
        <!--
           Time zone of OPW server is always in UTC.
        -->
        <importTimeZone>
            <timeZoneOffset>00:00</timeZoneOffset>
        </importTimeZone>
     </general>
     <properties>
          <!-- 
              Optional: This is a folder to which to OPW response messages will be written. 
              Use this option for debugging purposes.  
          -->
          <string key="RequestsOutputDirectory" value="c:/temp/>
 
          <!-- 
              Optional: Number of milliseconds for the import to wait for a response from the server.
          -->
          <int key="ReadTimeoutMillis" value="5000"/>
 
         <!-- 
              Optional: Number of milliseconds for the import to wait for establishing a connection to the server.
          -->
          <int key="ConnectionTimeoutMillis" value="5000"/>
      </properties>
      <timeSeriesSet>
          <moduleInstanceId>ImportOpw</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>Sensor_num</parameterId>
          <locationSetId>Station_num</locationSetId>
          <timeSeriesType>external historical</timeSeriesType>
       <timeStep unit="minute" multiplier="15"/>
       <readWriteMode>add originals</readWriteMode>
       <synchLevel>1</synchLevel>
    </timeSeriesSet>
    </import>
</timeSeriesImportRun>

  • No labels