qr code All content created by a human. No AI.

BIT-101

Bill Gates touched my MacBook Pro

Runways


[ misc ]

I’ve been posting daily coded animations for the past 55 days as of today. You can see my “Octanimate” series in these posts:

And what I’ve been doing in November here: Dailies

The latest one of the dailies is here:

I really enjoyed the process of making this and wanted to share some of the process.

For a while now I’ve had the urge to do some kind of mapping visualization. I’d been looking around for open elevation map data sets but didn’t find anything easy to get a hold of and work with. The other day I thought, “what about just getting the coordinates of every ____ in the country?”. It would have to be something that was important enough to be documented and worth someone actually compiling the latitude and longitude of each point.

Airports was the first one that came to mind. So I did a search. The first hit I got not only had the location of each airport in the country, but the coordinates of each runway! Eight thousand, six hundred and twenty four of them to be exact. Here’s that link. https://geodata.bts.gov/datasets/110af7b8a9424a59a3fb1d8fc69a2172_0/explore?location=42.363561%2C-71.006261%2C14.39&showTable=true

There are multiple formats available for the data. I first went for the GeoJSON format. But this was a bit too much. It actually contained coordinates for the polygon shapes of each runway! I pulled down the CSV version and that was much simpler - the coordinates for the start and end of each runway, basically just a line segment. Here’s a single line of that file, representing a single runway at LAX.

635,2025/10/30,01818.,A,CA,LAX,LOS ANGELES INTL,LOS ANGELES,US,PU,PU,06L/24R,33.94911247,-118.43115986,33.95210391,-118.40194891,8926,150,ASPH-CONC,GOOD,GRVD,,,,,,HIGH,3RD PARTY SURVEY,2010/03/23,120,203,383,880,181220.57421875,6663.48966096801

The coords for that runway are: (33.94911247,-118.43115986) to (33.95210391,-118.40194891), found in the 13th through the 16th fields there.

This was super easy to parse in Go, grab the two points for each runway, do a bit of translation and scaling to center the whole thing and draw each one of those 8,624 runways. And voila!

black screen with some white dots in the center looking like the shape of the USA

Since a few degrees of lattitude or longitude cover a very wide area, mapping this directly to pixels gives us a tiny little map. But fi I zoom in by say 15x, we’re seeing the whole country.

black screen with some white dots in the center looking like the shape of the USA

Now if I pan over to Boston Harbor and zoom in 10,000x, we have the glorious chaos that is Logan International Airport.

black screen with some white representing airport runways

And it’s easy enough to do that for any location. Here’s San Francisco.

black screen with some white representing airport runways

Next I wanted to animate it. This took a bit of trial and error. On the one hand, you want to see what some actual runways look like. On the other hand, you want to see the whole mass of them. After trying a whole bunch of things I settled on starting zoomed in on Boston at 4000x, slowly zooming out to 25x then panning over to SFO, and finally zooming back in. Stuck some labels on there and a bit of fading in and out and it’s a wrap.

This was a really fun project and really just took a couple hours one night and a bit of touch up the next morning. Getting, parsing and drawing the data was easy. The zooming into a specific location and the labels were a bit tricky, and getting the animation right consumed the most of the time. I’m looking forward to finding other data sets like this that I can play with.

« Previous Post

Comments? Best way to shout at me is on Mastodon

Or share this post directly on Mastodon