GeoJSON Service Help


Location: /cgi-bin/json/TafJSON.php

This script will create GeoJSON output using data from the ADDS database. The latest TAF is returned if site has a valid TAF available at the valid time. Here is sample output:

{ "type": "FeatureCollection",
    "features": [
    { "type": "Feature",
      "id": "13785948",
      "properties": {
          "data": "TAF",
          "id": "KATL",
          "site": "Atlanta/Hartsfield I",
          "issueTime": "2019-12-30T19:35:00Z",
          "validTimeFrom": "2019-12-30T20:00:00Z",
          "validTimeTo": "2020-01-01T00:00:00Z",
          "validTime": "2019-12-30T21:11:00Z",
          "timeGroup": "0",
          "fcstType": "PREVAIL",
          "wspd": 13,
          "wdir": 270,
          "wgst": 20,
          "visib": 6.21,
          "cover": "FEW",
          "fltcat": "VFR",
          "rawTAF": "KATL 301935Z 3020/3124 27013G20KT P6SM FEW250 FM302300 27008KT P6SM SKC 
              FM311500 29012G20KT P6SM SKC"
      "geometry": {
          "type": "Point",
          "coordinates": [-84.44,33.63]
    { "type": "Feature",
        "id": "13784163",
        "properties": {
            "data": "TAF",
            "id": "KORD",

The properties output from the script are:

  • id - Station identifier
  • site - The long name for the site
  • issueTime - ISO 8601 formatted date and time when TAF issued
  • validTimeFrom - ISO 8601 formatted date and time when TAF is first valid
  • validTimeTo - ISO 8601 formatted date and time when TAF is last valid
  • validTime - ISO 8601 formatted date and time for requested TAF
  • timeGroup - Index for grouping inside TAF
  • fcstType - Type of forecast: PREVAIL, TEMPO
  • wspd - Wind speed in knots
  • wdir - Wind direction in degrees
  • wgst - Wind gusts in knots
  • visib - Visibility in miles
  • ceil - Cloud ceiling in 100s feet for broken or overcast skies (missing otherwise)
  • cover - Maximum cloud cover
  • fltcat - Flight category, either VFR, MVFR, IFR, LIFR
  • rawTAF - Raw TAF text
  • rawOb - Raw METAR text

The script can be passed parameters via command line or through CGI REQUEST. The parameters to the script include:

  • bbox=minlon,minlat,maxlon,maxlat - This is the bounding box for area of interest. This limits the stations output in GeoJSON to those within that lat/lon range. The default is -130,20,-60,60.
  • fore=# - This sets the forecast time in hours. This will extract property data such as visib and ceil from future times in the TAF. The default is current.
  • filter=prior - This tells the script to use a priority scheme to filter stations on a priority scheme. It will base what priority to use on the size of the bounding box. The priority is set in the MetarSites table. The default is to only return stations with a priority of 2 or lower.
  • priority=# - This sets the default priority. The default is 2.
  • density=# - This augments the priority setting. This is used with the filter=prior setting to add more or less stations to the output relative to the default priority setting based on the bounding box. A setting of all will bypass the priority and display all stations.
  • metar=xxxx - If set to true or on or 1, this will include the latest METAR in the JSON output.
  • tempo=1 - If set, this will only temporary (TEMPO) conditions at the forecast time. The default is off (prevailing).
  • vdate=yyyymmddhhnn - This sets the valid date for the TAF. The output will be the latest TAF data from the site relative to this date. The default is current time.
  • jsonp=callback - This sets the callback function to be used in a JSONP call. This is just when the script is called on another server. The default is null which outputs straight JSON.