Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

The parser imports data from https://api.portofrotterdam.com/v1/weather-tide/observations.  To be able to access the API, you need to have a client key. 

...

Code Block
languagexml
linenumberstrue
<?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">
   <import>
      <general>
         <importType>RotterdamPort</importType>
         <serverUrl>https://api.portofrotterdam.com/v1/weather-tide/observations</serverUrl>
		<!-- the client key should be set as user -->
         <user>client key</user>
         <password>YYYY</password>
         <relativeViewPeriod unit="hour" start="-36" end="12" startOverrulable="true" endOverrulable="true"/>
	     <idMapId>RotterdamPortIdMapper</idMapId>
         <importTimeZone>
            <timeZoneOffset>+00:00</timeZoneOffset>
         </importTimeZone>
      </general>
      <timeSeriesSet>
         <moduleInstanceId>RotterdamPort</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>Tide</parameterId>
         <locationId>Amaliahaven</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="minute" multiplier="10"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </import>
</timeSeriesImportRun>

Parameters

...

languagexml
linenumberstrue

...


Configuring the parameter:

 

The name oof the parameter has to be the same as the name field in Observation, procedure,  description.  This field is used to contruct the correct url. Example:

"procedure": {
                    "name": "Height of tide 10 minutes POR",
                    "description": "Height of tide 10 minutes POR",

The id of the parameter (or, if mapping is used, the external id of the parameter)  has to be the same field as the name field in the parameters list, otherwhise the fieled will not be parsed.

"parameters": [

...


         

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

            

...

{
            

...

 

...

 

...

 

...

 

...

 

...

         

...

      

...

"name": "H10",
      

...

   

...

Either the ID of the parameter, or, if mapping is used, the external ID has to be the same as the field in Observation, procedure,  description. 

"procedure": {
                       "namevalue": "Height of tide 10 minutes POR",
 97.2
                            }
Code Block
languagexml
linenumberstrue
<parameter id="

...

H10"

...

 name="Height of tide 10 minutes POR"

...

>
		<shortName>H10</shortName>
		<description>Height of tide 10 minutes POR</description>
</parameter>

 

 

Java does not automatically recognize the certificate of  https://api.portofrotterdam.com/v1/weather-tide/observations. Delft-FEWS is based on JAVA and JAVA does not have by default the PKI Overheid certificate in it's distribution. Unlike popular browsers like Firefox, Chrome or IE. Therefore the PKI Overheid certificate should be made known to JAVA using the following guide:

...