GeoJSON Service Help


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

This script will create GeoJSON output using data from the NASR database. This will extract a list of Airports from the database. Here is sample output:

{ "type": "FeatureCollection",
    "features": [
    { "type": "Feature",
      "id": "5434",
      "properties": {
          "data": "AIRPORTS",
          "id": "KORD",
          "iata": "ORD",
          "name": "CHICAGO/CHICAGO O'HARE INTL",
          "state": "IL",
          "region": "US",
          "type": "ARP",
          "elev": "209.9",
          "mag_dev": "03W",
          "use": "P",
          "runways": 8,
          "rwy_len": "L",
          "rwy_type": "C",
          "services": "S",
          "tower": "T",
          "beacon": "B",
          "passengers": "83",
          "traffic": "903767",
          "rwy_detail": "04L/22R,7500x150,A;04R/22L,8075x150,A;09L/27R,7500x150,C;
          "freqs": "LCL/P,120.75;LCL/P,121.15;LCL/P,126.9;LCL/P,128.15;
      "geometry": {
          "type": "Point",
          "coordinates": [-87.907,41.974]
    { "type": "Feature",
        "id": "5471",
        "properties": {
            "data": "AIRPORTS",
            "id": "KDEC",
            "iata": "DEC",
            "name": "DECATUR/DECATUR",

The properties output from the script are:

  • id - Airport identifier, typically WMO id but can be IATA id if no WMO specified
  • iata - IATA airport identifier
  • name - The name for the site
  • type - Airport type: ARP (Airport), HEL (Heliport), SEA (Seaplane)
  • state - State within country/region
  • region - Region or country
  • elev - Elevation of site in meters
  • mag_dev - Magnetic variation/deviation from true north
  • use - Use of airport: P (public), M (military), R (private)
  • runways - Number of operational runways
  • rwy_len - Length of longest runway: L (long > 8070 ft), M (medium > 1500 < 8070 ft), S (short < 1500 ft)
  • rwy_type - Surface of primary runway: C (concrete), A (asphalt), G (gravel), T (turf), D (dirt), W (water)
  • services - Type of services: S (attended)
  • tower - Tower: T (operational)
  • beacon - Type of rotating beacon: B (sunset to sunrise)
  • passengers - Number of passengers (arriving and departing in 2018 in millions)
  • traffic - Number of take off and landings
  • rwy_detail - Specific information on each runway, each runway separated by a semicolon ";":
    name,size,type - name of runway/orientation "04L/22R", size lengthxwidth in feet, type is surface type (see rwy_type above)
  • freqs - Radio frequencies separated by a semicolon ";":
    type,freq - type: LCL/P (primary control tower), TWR (tower), ATIS (automated terminal information service), D-ATIS (data-link ATIS)

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.
  • 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 0 for major international airports, 3 for domestic with long runways, 4 for military, 5 for airports with medium runways, 6 for other public airports, 7 for everything else. The default is to only return nav aids with a priority of 3 or lower.
  • priority=# - This sets the default priority. The default is 3.
  • 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.