v1

latestOpenAPI 3.0.22026-07-132450182.6 KB
Weather

Retrieve forecast values along a route for all requested weather elements and time periods.

Retrieve forecast values along route for requested weather elements and time period. Request body parameters are:

  • route: GeoJSON Linestring defining the route. Max allowed length is 50 km.
  • wxtypes: list of one or more weather forecast elements you wish to retrieve. Allowed values are "CIG", "DEWPT", "SKY", "TEMP", "VIS", "WINDDIR", "WINDGUST", "WINDSPEED".
  • hours: number of hourly forecasts to return (1-24). For current hour only you should enter value of 1. To also retrieve values for each of the next n hours, enter n.

The response will consist of a GeoJSON FeatureCollection with one Feature for each forecast location found within requested area, properties of which will include an ordered list of forecast values for each requested weather element, for each requested hour. Units for each element are as follows:

  • CIG: meters AGL
  • DEWPT: degrees Celsius
  • SKY: % cloud cover
  • TEMP: degrees Celsius
  • VIS: meters
  • WINDDIR: degrees true
  • WINDGUST: meters/sec
  • WINDSPEED: meters/sec
post/us/v1/wx-forecast/route-query

Headers

x-api-keystring

Request body

routeobject required
wxtypesstring[] required
hoursinteger required

Example request

{
  "route": {
    "type": "LineString",
    "coordinates": [
      [
        -86.247,
        43.058
      ],
      [
        -86.214,
        43.076
      ],
      [
        -86.203,
        43.089
      ],
      [
        -86.192,
        43.083
      ],
      [
        -86.185,
        43.11
      ]
    ]
  },
  "wxtypes": [
    "WINDDIR",
    "WINDSPEED"
  ],
  "hours": 4
}

Response

A GeoJSON FeatureCollection with one Feature for each forecast location found within requested area.

foundobject required

Example response

{
  "found": {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -86.252478,
            43.057319
          ]
        },
        "properties": {
          "winddir": [
            270,
            270,
            270,
            270
          ],
          "windspeed": [
            2,
            2,
            2.4,
            2
          ],
          "hour": [
            "DEC 31 2022 16:00",
            "DEC 31 2022 17:00",
            "DEC 31 2022 18:00",
            "DEC 31 2022 19:00"
          ]
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -86.22099,
            43.077526
          ]
        },
        "properties": {
          "winddir": [
            310,
            300,
            290,
            280
          ],
          "windspeed": [
            1.2,
            1.6,
            2,
            2
          ],
          "hour": [
            "DEC 31 2022 16:00",
            "DEC 31 2022 17:00",
            "DEC 31 2022 18:00",
            "DEC 31 2022 19:00"
          ]
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -86.191414,
            43.076122
          ]
        },
        "properties": {
          "winddir": [
            300,
            280,
            270,
            280
          ],
          "windspeed": [
            2,
            2,
            2.4,
            2
          ],
          "hour": [
            "DEC 31 2022 16:00",
            "DEC 31 2022 17:00",
            "DEC 31 2022 18:00",
            "DEC 31 2022 19:00"
          ]
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -86.18949,
            43.097724
          ]
        },
        "properties": {
          "winddir": [
            320,
            310,
            290,
            280
          ],
          "windspeed": [
            1.2,
            1.6,
            2,
            2
          ],
          "hour": [
            "DEC 31 2022 16:00",
            "DEC 31 2022 17:00",
            "DEC 31 2022 18:00",
            "DEC 31 2022 19:00"
          ]
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "Point",
          "coordinates": [
            -86.187564,
            43.119323
          ]
        },
        "properties": {
          "winddir": [
            320,
            310,
            290,
            280
          ],
          "windspeed": [
            1.2,
            1.6,
            2,
            2
          ],
          "hour": [
            "DEC 31 2022 16:00",
            "DEC 31 2022 17:00",
            "DEC 31 2022 18:00",
            "DEC 31 2022 19:00"
          ]
        }
      }
    ]
  }
}