Special use airspace for mapping

I’m playing around with drawing airspace. The FADDS database has nice ESRI shapefiles for B, C, D, and E. Easy to use them directly with QuantumGIS or TileMill, or import them into PostGIS, or whatever. But they don’t publish special use airspace in shapefile format.

One option is to download the SUA data from the SoaringWeb community in OpenAir format, then convert and import it. It seems to work.

$ ogr2ogr -f "ESRI Shapefile" allusa allusa.v11.08-25.1.txt
$ shp2pgsql -s 4326 airspaces.shp | psql faadata
$ echo '\d airspaces' | psql faadata

 gid      | integer               |
 class    | character varying(80) |
 name     | character varying(80) |
 floor    | character varying(80) |
 ceiling  | character varying(80) |
 the_geom | geometry              |

$ echo 'select class, count(*) from airspaces group by class' | psql faadata

 class | count
 Q     |   456
 B     |   341
 P     |    12
 C     |   321
 R     |   417
 D     |   550

Classes.. B, C, and D are Bravo, Charlie, and Delta. P is prohibited, R is restricted, Q is “danger” (MOAs and Alert areas, I think). Name is free text. Floor and ceiling are also free text, things like “SFC”, “12500 MSL”, “300 AGL”, and “FL 180”.

FADDS does provide the special use airspace geometry in a couple of formats. There’s SUA.txt (10 megs), an old text format that ogr2ogr doesn’t seem to support. (The “SUA” driver is something else). There’s also the new SAA AIXM files. They are in FADDS and ogr2ogr has some support for them, but a quick test made it seem pretty inconvenient to use the data. (Update: I wrote Lynn, who makes the Soaring Web files, and she says she wrote her own complex code to handle SUA.txt)