You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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. 

Example

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": [
                            {
                                "name": "H10",
                                "value": 105.844827586207
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T12:50:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 102.033333333333
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T13:00:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 97.2
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T13:10:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 95.5423728813559
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T13:20:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 92.406779661017
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T13:30:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 90.1166666666667
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T13:40:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 85.8166666666666
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T13:50:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 79.9152542372881
                            }
                        ]
                    },
                    {
                        "phenomenonTime": "2018-11-05T14:00:00Z",
                        "parameters": [
                            {
                                "name": "H10",
                                "value": 72.8166666666667
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "_links": {
        "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": "https://api.portofrotterdam.com/v1/weather-tide/procedures/Height%20of%20tide%2010%20minutes%20POR"
        }
    }
}

 

Fews Configureation

<?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

<?xml version="1.0" encoding="UTF-8"?>
<parameters version="1.0" 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/parameters.xsd">

   <parameterGroups>
      <parameterGroup id="SeaLevel">
		<parameterType>instantaneous</parameterType>
		<unit>cm</unit>
     
         <parameter id="Tide" name="Height of tide 10 minutes POR">
            <shortName>Tide10</shortName>
            <description>Height of tide 10 minutes POR</description>
         </parameter>
      </parameterGroup>      
   </parameterGroups>

</parameters>

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": {
                    "name": "Height of tide 10 minutes POR",
                    "description": "Height of tide 10 minutes POR",

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:

How to configure secure https connection to Matroos

  • No labels