Versions Compared

Key

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

...

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. 

Data Example I

Code Block
linenumberstrue
collapsetrue
Url: https://api.portofrotterdam.com/v1/weather-tide/observations?from-time=2018-11-05T12:00:00.000Z&to-time=2018-11-05T14:00:00.000Z&location=Amaliahaven&procedure=Height%20of%20tide%2010%20minutes%20POR
 
{
    "_embedded": {
        "observations": [
            {
                "parameterType": {
                    "type": "HTIDE",
                    "description": "Height of tide"
                },
                "procedure": {
                    "name": "Height of tide 10 minutes POR",
                    "description": "Height of tide 10 minutes POR",
                    "parameters": [
                        {
                            "name": "H10",
                            "description": "Height of tide 10 minutes",
                            "uom": "cm",
                            "reference": "NAP"
                        }
                    ]
                },
                "featureOfInterest": {
                    "id": "9E1F30AA-2FE0-47B6-86F4-6F63F90B5BB0",
                    "location": "Amaliahaven",
                    "geometry": {
                        "type": "Point",
                        "coordinates": [
                            59315,
                            442446,
                            4.771
                        ],
                        "spatialReference": {
                            "wkid": "28992"
                        }
                    }
                },
                "result": [
                    {
                        "phenomenonTime": "2018-11-05T12:00:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 128.633333333333
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T12:10:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 122.949152542373
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T12:20:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 115.4
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T12:30:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 110.05
                            }
                        ]
                    },
                    {
    ]
                    "phenomenonTime": "2018-11-05T12:40:00Z",}
                ]
        "parameters": [
   }
        ]
    },
             "_links": {
          "self": {
                      "name": "H10",
  "href": "https://api.portofrotterdam.com/v1/weather-tide/observations?location=Amaliahaven&procedure=Height%20of%20tide%2010%20minutes%20POR&from-time=2018-11-05T12:00:00.000Z&to-time=2018-11-05T14:00:00.000Z"
        },
        "location": {
             "valuehref": 105.844827586207
                   "https://api.portofrotterdam.com/v1/weather-tide/locations/Amaliahaven"
         },
        "procedure": {
               ]"href": "https://api.portofrotterdam.com/v1/weather-tide/procedures/Height%20of%20tide%2010%20minutes%20POR"
        }
            },
      
}


Some phenomenons have two different parameters (such as wind direction and wind speed). You can choose to parse either or both of them. If you need both values, two different time series should be configured using the same qualifierId.

Data example II:

Code Block
linenumberstrue
collapsetrue
{
    "_embedded": {
        "observations": {[
            {
                "phenomenonTimeparameterType": "2018-11-05T12:50:00Z",{
                        "parameterstype": ["TDSTR",
                    "description":        {"Tidal stream"
                },
                "nameprocedure": "H10",{
                    "name": "Predicted tidal stream 10 minutes depth averaged     "value": 102.033333333333OSR",
                    "description": "Predicted tidal stream 10 minutes depth averaged }OSR",
                        ]"parameters": [
                    },
    {
                {
            "name": "PTSDDA10",
           "phenomenonTime": "2018-11-05T13:00:00Z",
                "description": "Predicted tidal stream direction 10 minutes depth averaged"parameters": [
,
                             {
   "uom": "deg",
                             "namereference": "H10Ntrue",
                        },
        "value": 97.2
               {
             }
                        ]"name": "PTSRDA10",
                    },
        "description": "Predicted tidal stream rate 10 minutes depth averaged",
    {
                        "phenomenonTimeuom": "2018-11-05T13:10:00Z",m/s"
                        "parameters": [}
                    ]
        {
         },
                "featureOfInterest": {
      "name": "H10",
              "id": "89F8AE3B-C7E5-4DBB-809A-950DD63953CD",
                    "valuelocation": 95.5423728813559"Bolnes",
                    "geometry": {
       }
                 "type": "Point",
       ]
                 "coordinates": [
  },
                    {
      99124,
                  "phenomenonTime": "2018-11-05T13:20:00Z",
          435302.7
                "parameters": [
       ],
                     {
   "spatialReference": {
                            "namewkid": "H1028992",
                        }
        "value": 92.406779661017
           }
                 },
                        ]"result": [
                    },{
                    {
                        "phenomenonTime": "2018-11-05T13:30"phenomenonTime": "2019-03-10T19:00:00Z",
                        "parameters": [
                            {
                                "name": "H10PTSRDA10",
                                "value": 900.116666666666762
                            },
                          ]  {
                    },
            "name": "PTSDDA10",
       {
                         "phenomenonTimevalue": "2018-11-05T13:40:00Z",103.9
                        "parameters": [
   }
                         {]
                    },
            "name": "H10",
        {
                        "valuephenomenonTime": 85.8166666666666"2019-03-10T19:10:00Z",
                        "parameters": [
    }
                        ]{
                    },
            "name": "PTSRDA10",
        {
                        "phenomenonTimevalue": "2018-11-05T13:50:00Z",0.6
                        "parameters": [
   },
                            {
                                "name": "H10PTSDDA10",
                                "value": 79103.91525423728819
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "20182019-1103-05T1410T19:0020:00Z",
                        "parameters": [
                            {
                                "name": "H10PTSRDA10",
                                "value": 720.816666666666756
                            },
                        ]    {
                    }
            "name": "PTSDDA10",
    ]
            }
        ]
    },
    "_linksvalue": {103.9
        "self": {
                   "href": "https://api.portofrotterdam.com/v1/weather-tide/observations?location=Amaliahaven&procedure=Height%20of%20tide%2010%20minutes%20POR&from-time=2018-11-05T12:00:00.000Z&to-time=2018-11-05T14:00:00.000Z"
 }
             },
          "location": {]
                "href": "https://api.portofrotterdam.com/v1/weather-tide/locations/Amaliahaven"
    },
           },
        "procedure": {
            "href            "phenomenonTime": "https://api.portofrotterdam.com/v1/weather-tide/procedures/Height%20of%20tide%2010%20minutes%20POR"
2019-03-12T19:00:00Z",
          }
       }
}

 

Fews Configureation

As a qualifier ID of each time series the name (or description) from the procedure should be configured. This field is necessary to constuct the URL.

Example:

 

...

 

...

      "parameters": [
             

...

 

...

 

...

 

...

 

...

 

...

 

...

         {
           

...

 

...

 

...

 

...

 

...

 

...

 

...

               

...

"

...

name":

...

Code Block
languagexml
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews"
PTSRDA10",
                 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>
"value": 0.84
          <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>
    "name": "PTSDDA10",
       <timeZoneOffset>+00:00</timeZoneOffset>
         </importTimeZone>
      </general>
      <timeSeriesSet>
     "value": 104.7
                         <moduleInstanceId>RotterdamPort</moduleInstanceId>   }
         <valueType>scalar</valueType>               ]
         <parameterId>Tide</parameterId>
		 <qualifierId>Height of tide 10 minutes POR</qualifierId>
         <locationId>Amaliahaven</locationId>
         <timeSeriesType>external historical</timeSeriesType>
                    }
                ]
            }
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.portofrotterdam.com/v1/weather-tide/observations?location=Bolnes&procedure=Predicted%20tidal%20stream%2010%20minutes%20depth%20averaged%20OSR&from-time=2019-03-10T19:00:00.000Z&to-time=2019-03-12T19:00:00.000Z"
        },
        "location": {
            "href": "https://api.portofrotterdam.com/v1/weather-tide/locations/Bolnes"
        },
        "procedure": {
            "href": "https://api.portofrotterdam.com/v1/weather-tide/procedures/Predicted%20tidal%20stream%2010%20minutes%20depth%20averaged%20OSR"
        }
    }
}


Fews Configuration

As a qualifier ID of each time series the name (or description) from the procedure should be configured. This field is necessary to constuct the URL. The field should be the same as the value of "procedure" in the URL.  Strings of "%20" can be replaced by a space.

Example:

procedure=Height%20of%20tide%2010%20minutes%20POR
"procedure": {
                    "name": "Height of tide 10 minutes POR",
                    "description": "Height of tide 10 minutes POR",
                    "parameters": [

A qualifier id must be configured in exactly one place: either in the module config (see bellow) or in the id mapping.


Some phenomenons have two different parameters (such as wind direction and wind speed). You can choose to parse either or both of them. If you need both values, two different time series should be configured using the same qualifierId. See Example II.


Example:

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>dummy_client_key</user>
         <password>dummy_password</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>
		<!-- Do not configure a qualifierId here if you are using id-mapping -->
		 <qualifierId>Height of tide 10 minutes POR</qualifierId>
         <locationId>Amaliahaven</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="minute" multiplier="10"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
   </import>
</timeSeriesImportRun>


Example II

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>
			<user>dummy_username</user>
			<password>dummy_password</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>PTSRDA10</parameterId>
			<!-- Do not configure a qualifierId here if you are using id-mapping -->
			<qualifierId>Predicted tidal stream 10 minutes depth averaged OSR</qualifierId>
			<locationId>Bolnes</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="minute" multiplier="10"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>RotterdamPort</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>PTSDDA10</parameterId>
			<!-- Do not configure a qualifierId here if you are using id-mapping -->
			<qualifierId>Predicted tidal stream 10 minutes depth averaged OSR</qualifierId>
			<locationId>Bolnes</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="minute" multiplier="10"/>
         			<readWriteMode>add originals</readWriteMode>
      		</timeSeriesSet>
   	</import>
</timeSeriesImportRun>

 


Configuring the parameter:

...


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.

...

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>

...


Using id mapping

Alternatly ID mapping can be used:

Code Block
languagexml
<?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 externalLocation="Amaliahaven" externalParameter="AH10H10" internalLocation="AmyHaven" internalParameter="Tide" externalQualifier="Height of tide 10 minutes POR" />
</idMap> 

 

...



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:

...