GET /route¶
Description¶
The /route
endpoint queries weather forecast parameters along a
route defined as a set of waypoints in space and time (location1;time1),(location2;time2 or speed),...
.
Endpoint¶
GET https://api.route-weather.com/route
Query parameters¶
Parameter | Value | Description |
---|---|---|
waypts | array of waypoints | Waypoints interpolated by shortest distance along a great circle arc. See waypoint definitions. |
drive | array of waypoints | Routes between waypoints are resolved using a roads routing engine for shortest distances between locations along a road network. See waypoint definitions. Note: drive= argument implicitly sets solver=road . |
solver | string | Selects a solver for calculating forecast points between waypoints. E.g. solver=road finds a solution between waypoints along a road network. Current available options are road (roads routing engine) or the default gca (great circle arc). |
params | array of parameters | Forecast model and parameters to query. See parameter definitions. |
view | view name | See view options. |
token | string | Unique access key, see authorization api. |
save | boolean [true/false] | Stores forecast data response so that can be recalled and shared using the saved endpoint. |
Compulsory query parameters are one of waypts
or drive
Example request¶
Sailing¶
Great circle route from Thorlakshofn in Iceland towards Azore Islands at 15 knots cruising speed.
https://api.route-weather.com/route?waypts=(Thorlakshofn;now),(Azores_Islands;15kn)¶ms=wind,temp&view=json
Driving¶
Shortest route along roads network from Thorlakshofn towards Akureyri at 80 kph average speed, with 1 hour stop in Stadarskali.
Can provide an array of waypoints using drive=...
:
https://api.route-weather.com/route?drive=(Thorlakshofn;now),(Stadarskali;80kph),(Stadarskali;prev_plus_2h),(Akureyri;80kph)¶ms=wind,temp&view=json
waypts=...
and set solver=road
,
https://api.route-weather.com/route?solver=road&waypts=(Thorlakshofn;now),(Stadarskali;80kph),(Stadarskali;prev_plus_2h),(Akureyri;80kph)¶ms=wind,temp&view=json
Example response¶
{
"forecasts": {
"gfs": {
"source": "GFS 2019-01-22T1800",
"dists": [0.0, 27780.0, 55560.0, ..., 2821447.279],
"lats": [63.856, 63.611, 63.365, ..., 38.721],
"lons": [-21.387, -21.491, -21.593, ..., -27.218],
"times": [1548211878, 1548215478, 1548219078, ..., 1548577508]
"members": {
"gfs": {
"temp": [0.531, 2.773, 3.369, ..., 13.739],
"wind": [2.489, 5.868, 7.503, ..., 7.846]
}
},
}
},
"units": {
"temp": "°C",
"wind": "m/s"
},
"waypts": {
"route": [{ "label": "Thorlakshofn",
"lat": 63.85617,
"lon": -21.38656,
"time": 1548211878.0},
{ "label": "Azores Islands",
"lat": 38.72116,
"lon": -27.21759,
"time": 1548577508.3200748}]
}
}