Rendering the Grand Canyon 2016-05-06

This week, I attended the FOSS4G conference here in Raleigh. While there, I learned about Mapzen's new elevation tiles. These tiles come in a variety of formats including terrarium, normal map, geotiff, and skadi. This is really nice, not because this data wasn't available before, but because it's more easily accessible and easier to deal with in the form of tiles. So I decided to see what I could do with this new resource.

I already had some Go code that can download and stitch tiles from any tile server into a large image. I stitched together three different sets of tiles: terrarium, normals and satellite imagery. The terrarium data is basically height map data that I used to generate a 3D mesh. The normal map is used to provide higher resolution lighting on the lower resolution mesh. And the satellite imagery is used for color information on the terrain. I used MapQuestOpen.Aerial for the satellite imagery, found on the Leaflet providers site. Here are the three stitched images...

Again, the terrarium image was used to generate a 3D mesh that I saved as an STL file. You can see some of that code here. The other two images were used as textures for OpenGL. I used my Python OpenGL library, pg, that makes it really easy to put together simple OpenGL apps. I used it to create the video above.