When working with geospatial data on Google Earth (for example, from our AEREarth tool), you might need the elevations for some coordinates. If it’s only a handful, they’re easily found with Google Earth’s interface. But let’s say you want elevations for dozens, hundreds, or even thousands of locations.
Requesting the data directly from Google Maps’ Application Programming Interface (API) is an enormous shortcut. Google Maps lets you query elevations at up to 512 point locations at a time. Before you can get started though, you will need to set up an API key.
The next step is formatting your coordinates and placing that API key into a web address (or URL). Building a URL of that length can be maddening, so we made an Excel workbook for formatting it. Here’s a how-to for using this tool:
- Download the Air Sciences .xlsx file.
- Insert your own API key in the workbook (cell C12).
- Paste your latitude coordinates (in column C starting at cell C19) and longitude coordinates (in column D starting at cell D19).
- View the web address populated by the formula in cell A1.
- Copy the web address from cell A1 into your browser’s address bar. Firefox works best as you can save the output as JSON.
- Wait for the data to load and receive your elevation dataset in a JSON format. Then, save as a JSON file from Firefox, which you may import directly into Excel.
If you prefer to flex your coding skills, please see our post about using Python with the Google Maps Elevation API. There you’ll find blocks of reusable code to get you started!