Showing posts with label kml. Show all posts
Showing posts with label kml. Show all posts

Saturday, June 2, 2012

Xtide: Tide Prediction KML File Updated

I use David Flater's Xtide tide prediction software to view tide levels when I go to the beach. His updates the tide database periodically, and when that file is updated, the location numbers can change. Thus, I need to update the Xtide KML file that displays those locations. There are 4,527 locations (both reference and sub) in the latest harmonics file, dated March 2, 2012. The file contains locations both north and south of the equator.

Sunday, November 22, 2009

Airspace KML files updated for the December 17 cycle

I updated the airspace KML files again -- skipping one release. The latest covers from December 17, 2009 throughFebruary 11, 2010. You can find them in the archive here.

Tuesday, August 25, 2009

Airport AWOS Frequency/Phone KML file updated

I have updated the AWOS frequency, phone, phone and type file based on the FAA's 56-day subscription data. However, instead of using latitude and longitude included in the file, I joined the main airport file by airport ID. This requires making an assumption that all AWOSes are at the airport they serve. While that might not be the case, I get 643 more airports into the file then before. The AWOS file has 2,185 entries of which 1,542 have latitude and longitude. Almost every corresponding airport in the APT file has latitude and longitude. Thus, DCA will now show up with a phone number, but no frequency. The new KML will also show the AWOS type: ASOS, AWOS-1, AWOS-2, AWOS-3, or AWOS-A.

Finally, matching airports to AWOS increases the complexity. I had hoped to write a simple script that does text manipulation for all KML files -- one script altering one FAA text file to produce one KML file. As with the Special Use Airspace, however, there wasn't a good way to do it without using a database and relations.

Find them in the KML archive.

Wednesday, August 19, 2009

Airspace, Special Use, and Airport KML files updated (not all US Airports are in the Western Hemisphere)

I updated the Airspace, Special Use, and Airport KML files for the FAA data covering the 56 Day Subscription from August 27 2009 to October 22 2009. I have also created batch files to call all the scripts, and I'm working on a T-SQL script to clear the tables and do a bulk import from the files.

Also, I corrected one incorrect assumption. Not all US Airports are in the western hemisphere. I assumed all longitudes were W and put a minus sign in the conversion to Google/KML decimal format from the FAA's all-seconds format. Wrong. In the updated file, MAJ (MARSHALL ISLANDS INTL) is in the right place. I'm still not sure Pago-Pago is correct, however.

The index of files is here.

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.


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:
usairports.jpg


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.