Thursday, December 1, 2011

Special Use Airspace KML: Boy was my KML invalid!

I have updated my KML output script so that the KML it outputs is valid, thanks to the KML Validator. The latest version of Google Earth is not nearly so tolerant of poorly written KML, which I only recently noticed when I tried to open my KML files that had worked just fine previously.

The main problems were my coordinate lists, where instead of delimiting by a space between tuples, I had delimited with a newline. I also did not close the coordinate sets with the first coordinate. The FAA doesn't either, because it's obvious. You draw a line from the last coordinate to the first. After the loop, I do a recordset.movefirst and write the first coordinate pair AGAIN.

Anyhow, you can see the new file in the KML archive. I may get around to doing more than just the SUA files. I'm also considering migrating the entire codebase to Python for portability. And because all the cool kids are writing in Python, and I can't stay in vbscript forever...

This KML file contains the FAA's special use types of airspace: alert areas, military operations areas, prohibited areas, restricted areas, and warning areas.

No comments:

Post a Comment