Skip to content

GET /path

Description

The /path endpoint queries weather forecast parameters along a list of spatial locations: waypts=(location1),(location2),.... The /path service differs from the /route service in that it provides forecast for the entire path on each forecast step in the forecast model.

The /path endpoint is useful for fetching and displaying forecasts along a route or road network in terms of forecast time steps, the same way as weather maps traditionally show forecasts at each forecast time step for a region. I.e. it does not provide a forecast centered on the traveller in both time and space, but only space.

Endpoint

GET https://api.seamon.io/path

Query parameters

Parameter Value Description
waypts array of waypoints Waypoints interpolated along a great circle arc by default. See waypoint location syntax.
drive array of waypoints Waypoints interpolated using a roads routing engine for shortest distances between locations along a road network. See waypoint location syntax. 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).
start string Start time for looking up forecast data, e.g. start=now or ISO time string start=2021-04-26T18:03. See waypoint time syntax.
stop string Stop time for looking up forecast data, e.g. stop=prev_plus_2h or ISO time string start=2021-04-26T20:03. See waypoint time syntax.
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

Forecast along a great circle path from Thorlakshofn in Iceland towards Azore Islands:

https://api.seamon.io/path?start=now&waypts=(Thorlakshofn),(Azores_Islands)&params=wind,temp&view=json

Driving

Forecast along a road network from Thorlakshofn towards Akureyri.

https://api.seamon.io/path?start=now&drive=(Thorlakshofn),(Stadarskali),(Akureyri)&params=wind,temp&view=json
Alternatively can use waypts=... and set path solver to solver=road,
https://api.seamon.io/path?start=now&solver=road&waypts=(Thorlakshofn),(Stadarskali),(Akureyri)&params=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": [1548180000, 1548183600, ..., 1548284400]
      "members": {
        "gfs": {
          "temp": [[0.531, 2.773, 3.369, ..., 13.739],
                   [0.423, 2.912, 3.462, ..., 13.210],
                   ... ]
          "wind": [[2.489, 5.868, 7.503, ..., 7.846],
                   [4.235, 4.125, 9.012, ..., 4.125],
                   ... ]
        }
      }, 
    }
  }, 
  "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}]
  }
}