FAA subscription data includes .shp (shape) files for ESRI products. Google Earth Pro ($400/year) is capable of opening these shape files directly, but the default setting is to make them opaque. Thus the class B airspace looks like one single area with no details. FWTools is a free open-source conversion tool to change GIS formats. It also does a much better job of converting the data, showing each individual airpspace and its low and high altitudes. The FAA marks the class E files as experimental, NOT TO BE USED FOR NAVIGATION.
The FWTools command to change from the FAA's .shp format to KML is as follows:
ogr2ogr -f "KML" C:\airports\class_b.kml C:\airports\class_b.shp The FAA lists airspace in order (e.g. Washington Class B Area A, Washington Class B Area B...), and fwtools maintains this order. When Google Earth displays this information, the last one listed goes on "top" of the area. Thus when you click on the center of a Class B zone, the widest area comes up, NOT the SFC to 10000 area. You can see the correct area when you click on the corresponding area layer, however. (I am currently working on a fix for this, but it requires some custom XML and SQL programming that's going to take some time.)
However, there is a weakness in Google Earth. The KML specification does not allow the creation of floating polygons. All non-plane polygons are extruded from the surface or ocean floor. Thus, there's no way to express in KML the upside-down-wedding-cake shape of your typical Bravo airspace. This may one day change, however, because Google is already adding its own extensions to the KML specification.
If you don't want to bother, just download the Airpspace KML files here: Archive link.The usual warning applies -- DO NOT USE FOR NAVIGATION. The KML archive is here.
Saturday, August 15, 2009
Wednesday, August 12, 2009
Special Use Airspace in Google Earth
According to the FAA, there are 977 U.S. special use airspaces around the world. (Some are international, like the Pacific off of Guam.) By Special Use airspace, I mean the following FAA Types: ALERT AREA, MILITARY OPERATIONS AREA, PROHIBITED AREA, RESTRICTED AREA, WARNING AREA. (Another side note: It's not just the FAA that loves ALL CAPS. The Department State also uses ALL CAPS in its cables.) There are many areas of the United States, in CONUS, Alaska and Hawaii, that are special use.
The FAA flat-fixed file that is the source of this data is so convoluted that I have a new-found respect for companies like Jeppesen that produce the data in a readable format every 56-day cycle. The FAA stuffs 8 different tables into one giant flat file with a well-documented layout.
Google Earth is not perfect with its polygons, either. It's got bugs, especially when it comes to KML stylesheets. I wrote the style tags with VBScript out of SQL, so they are all the same, but in Google Earth, they don't all look the way they're supposed to. It feels like troubleshooting early versions of Netscape and IE when writing HTML. And no, I didn't use some fancy XSL to transform my queries into KML (XML). I used VBScript because it's the tool I know and it's fast.
The usual warning applies: DO NOT USE FOR NAVIGATION. My code isn't perfect, and neither is the FAA's data. There is no substitute for a pre-flight briefing. I ask about the airspace every time flying out of the ADIZ.
Download the file here: US Special Use Airspace.kml.
The FAA flat-fixed file that is the source of this data is so convoluted that I have a new-found respect for companies like Jeppesen that produce the data in a readable format every 56-day cycle. The FAA stuffs 8 different tables into one giant flat file with a well-documented layout.
Google Earth is not perfect with its polygons, either. It's got bugs, especially when it comes to KML stylesheets. I wrote the style tags with VBScript out of SQL, so they are all the same, but in Google Earth, they don't all look the way they're supposed to. It feels like troubleshooting early versions of Netscape and IE when writing HTML. And no, I didn't use some fancy XSL to transform my queries into KML (XML). I used VBScript because it's the tool I know and it's fast.
The usual warning applies: DO NOT USE FOR NAVIGATION. My code isn't perfect, and neither is the FAA's data. There is no substitute for a pre-flight briefing. I ask about the airspace every time flying out of the ADIZ.
Download the file here: US Special Use Airspace.kml.
Monday, August 10, 2009
US Airports by Region in Google Earth & Maps via KML
Given that my other x64 4GB computer hung this morning when loading the large KML file this morning, I decided to break up the KML file into the following FAA regions:ALASKA, CENTRAL, EASTERN, GREAT LAKES, NEW ENGLAND, NORTHWEST MOUNTAIN, SOUTHERN, SOUTHWEST and WESTERN-PACIFIC. (Once again, the FAA really really likes ALL CAPS.)
I also set up a directory to hold all my KML files, including the original all US airports and the AWOS file at this location. To view in Google Maps rather than Google Earth, add "http://maps.google.com/?q=" to the front of the URL.
I also set up a directory to hold all my KML files, including the original all US airports and the AWOS file at this location. To view in Google Maps rather than Google Earth, add "http://maps.google.com/?q=" to the front of the URL.
Sunday, August 9, 2009
View all US Airports on Google Earth via KML
I finally took the time to write the script to take the raw National Flight Data Center APT.TXT file and write it straight to a Google Earth and Maps-compliant KML file. It's pretty basic XML, with a little math to convert the FAA's all-seconds format into decimal coordinates.
A word of warning: DO NOT USE FOR NAVIGATION. This is unverified data from the FAA, and my math is often accurate to about a factor of ten. Also, there are 13,569 airports, which means there are 13,569 points in this file. It's enough to max out the processor running Google Earth on your computer. However, when you zoom in to a single state, it will speed up because most points are off-screen. I filtered out non-airport landing facilities: BALLOONPORT, SEAPLANE BASE, GLIDERPORT, HELIPORT, STOLPORT, ULTRALIGHT, so you will find none of those in this file. (The FAA likes things in ALL CAPS.)
The pop-up description of each data point includes the airport code, airport name, UNICOM frequencies, CTAF, and pulic or private. Download the US Airports KML file here.
Here's a screenshot of Google Earth with the KML loaded:

A word of warning: DO NOT USE FOR NAVIGATION. This is unverified data from the FAA, and my math is often accurate to about a factor of ten. Also, there are 13,569 airports, which means there are 13,569 points in this file. It's enough to max out the processor running Google Earth on your computer. However, when you zoom in to a single state, it will speed up because most points are off-screen. I filtered out non-airport landing facilities: BALLOONPORT, SEAPLANE BASE, GLIDERPORT, HELIPORT, STOLPORT, ULTRALIGHT, so you will find none of those in this file. (The FAA likes things in ALL CAPS.)
The pop-up description of each data point includes the airport code, airport name, UNICOM frequencies, CTAF, and pulic or private. Download the US Airports KML file here.
Here's a screenshot of Google Earth with the KML loaded:

Saturday, August 8, 2009
Displaying FAA Airport AWOS Data in Google Earth and Google Maps with KML
The FAA releases updated Airport data every 56 days via the National Flight Data Center Portal. However, since government contracts apparently don't have any usability requirements, it's difficult to navigate, and the data is still in a fixed-field format reminiscent of cobol and mainframes. (Which, by the way, is a format that plays a huge role in banking even in 2009.)
After cleaning it up and matching airports with their AWOS data, I created a KML file. KML is simple XML -- you just need to do get the elements correct. The AWOS frequency and phone number is in the pop-up for each point.
With this file you can see all airports for which the FAA has latitude and longitude data. The FAA doesn't have coordinates for all airports, so many are missing. (Why they don't have coordinates for major airports like DCA in the AWOS file is beyond me. They have them in the airport facilities file.)
To view it in Google Maps (if you don't have Google Earth), use the
http://maps.google.com/?q=http://cw.sampas.net/kml/US_AWOS_20090827-20091022.kml format, which will pull the KML from the link after the ?q=.
Coming soon: VBScript to take the raw FAA files and produce KML. VBScript isn't the best way to export text to XML, but it is easy to write and very quick.
After cleaning it up and matching airports with their AWOS data, I created a KML file. KML is simple XML -- you just need to do get the elements correct. The AWOS frequency and phone number is in the pop-up for each point.
With this file you can see all airports for which the FAA has latitude and longitude data. The FAA doesn't have coordinates for all airports, so many are missing. (Why they don't have coordinates for major airports like DCA in the AWOS file is beyond me. They have them in the airport facilities file.)
To view it in Google Maps (if you don't have Google Earth), use the
http://maps.google.com/?q=http://cw.sampas.net/kml/US_AWOS_20090827-20091022.kml format, which will pull the KML from the link after the ?q=.
Coming soon: VBScript to take the raw FAA files and produce KML. VBScript isn't the best way to export text to XML, but it is easy to write and very quick.
Monday, June 22, 2009
Logparser: find which computers are locking your windows accounts.
To find account lockout events on multiple domain controllers, download logparser 2.2 and execute the following command in a domain admin context (e.g. runas user:domain\administrator logparser.exe), where the part below the command is in "lockouts.sql". The account lockout event is 644 -- if you need to find others, read Microsoft's KB174074 Also, this script will access each domain controller's security event log sequentially, so if you're in a hurry, execute several different logparser processes for each domain controller.
logparser.exe file:c:\scripts\logparser\lockouts.sql -i:EVT -o:datagrid
------stick this part in lockouts.sql
SELECT
timegenerated AS LogonTime,
extract_token(strings, 0, '|') AS UserName,
message as Message
FROM \\domaincontroller1\security, \\domaincontroller2\security, \\domaincontrolle2\Security
WHERE EventID = 644
-----end here
If you want the output to go into a database instead of a datagrid (Excel-type) table, make the logparser command look like this:
logparser.exe file:c:\scripts\logparser\lockouts.sql -o:SQL -server:myDBservername driver:"SQL Server" -database:myDBname -createtable:ON
Table name will end up matching your dbname. Set -createtable to off after you run it once.
Props to: Microsoft's Log Parser Toolkit, by Gabriele Giuseppini and Mark Burnett.
If you're going to be doing anything with windows logs, buy the book. It's more useful than several log management software packages I've demo'ed.
Download Log Parser here.
logparser.exe file:c:\scripts\logparser\lockouts.sql -i:EVT -o:datagrid
------stick this part in lockouts.sql
SELECT
timegenerated AS LogonTime,
extract_token(strings, 0, '|') AS UserName,
message as Message
FROM \\domaincontroller1\security, \\domaincontroller2\security, \\domaincontrolle2\Security
WHERE EventID = 644
-----end here
If you want the output to go into a database instead of a datagrid (Excel-type) table, make the logparser command look like this:
logparser.exe file:c:\scripts\logparser\lockouts.sql -o:SQL -server:myDBservername driver:"SQL Server" -database:myDBname -createtable:ON
Table name will end up matching your dbname. Set -createtable to off after you run it once.
Props to: Microsoft's Log Parser Toolkit, by Gabriele Giuseppini and Mark Burnett.
If you're going to be doing anything with windows logs, buy the book. It's more useful than several log management software packages I've demo'ed.
Download Log Parser here.
Tuesday, June 16, 2009
Brand Dimensions' bot stops, but Brand Dimensions doesn't.
Now that I added user-agent: BDFetch, disallow / to my robots.txt, all the BDFetch bot gets is robots.txt. However, some people Brand Dimensions is now browsing my blog:
72.14.164.134 - - [08/Jun/2009:13:58:26 -0400] "GET /blog HTTP/1.1" 301 314 "-" "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)"
72.14.164.133 - - [08/Jun/2009:13:58:26 -0400] "GET /blog/ HTTP/1.1" 200 57901 "-" "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)"
72.14.164.196 - - [08/Jun/2009:13:58:42 -0400] "GET /blog/2009/06/comcast-is-collecting-data-on.html HTTP/1.1" 200 16335 "-" "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)"
A little research reveals that they have a class C block of IPs:
CustName: Brandimensions Inc.
Address: 5090 Explorer Drive
Address: Suite 203
City: Mississauga
StateProv: ON
PostalCode: L4W-4T9
Country: CA
RegDate: 2008-06-25
Updated: 2008-06-25
NetRange: 72.14.164.0 - 72.14.164.255
CIDR: 72.14.164.0/24
Thus blocking 72.14.164.0/24 at the firewall will prevent them from seeing anything.
72.14.164.134 - - [08/Jun/2009:13:58:26 -0400] "GET /blog HTTP/1.1" 301 314 "-" "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)"
72.14.164.133 - - [08/Jun/2009:13:58:26 -0400] "GET /blog/ HTTP/1.1" 200 57901 "-" "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)"
72.14.164.196 - - [08/Jun/2009:13:58:42 -0400] "GET /blog/2009/06/comcast-is-collecting-data-on.html HTTP/1.1" 200 16335 "-" "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1)"
A little research reveals that they have a class C block of IPs:
CustName: Brandimensions Inc.
Address: 5090 Explorer Drive
Address: Suite 203
City: Mississauga
StateProv: ON
PostalCode: L4W-4T9
Country: CA
RegDate: 2008-06-25
Updated: 2008-06-25
NetRange: 72.14.164.0 - 72.14.164.255
CIDR: 72.14.164.0/24
Thus blocking 72.14.164.0/24 at the firewall will prevent them from seeing anything.
Subscribe to:
Posts (Atom)