We’re now able to query elevation data captured from drone flights. The example below uses terrain data recorded on a Sensefly eBee drone flight over a quarry near Lake Geneva. After processing the data with Pix4D, we know the elevation of every point in the area flown. With a little math we can calculate the total volume of gravel removed at the quarry.

Both the imagery and the elevation data captured during flight can be uploaded right to mapbox.com. Using Mapbox.js, I’m able to overlay the drone imagery on top of our satellite layer, build out a layer switcher to toggle contour lines, and query the vector data behind the map using the Surface API.

Requests for elevation data made via the Surface API allow us to calculate the total volume of earth removed from the quarry._

To calculate volume, we first looked at a single elevation data request, which is represented as one horizontal line on the map. By making many of these small “slab” requests in a row, the total approximate volume can be calculated with a simple formula that I worked on with our rocket scientist, Bruno.

The Surface API launched this week in private beta, let me know if you want to check it out or hit me up on Twitter @bobws.