Projects > Elevation Zone Finder

Elevation Zone Finder

The Plan

Create an application that takes a user query consisting of a coordinate location, an elevation, and a map radius, and then uses The Google Elevation API to retrieve elevations based on coordinate locations. The Application will then map these coordinates (as either above or below the elevation) onto a Map image created by Google Static Maps. This color-coordinated map should give the user a rough idea of what areas within his elevation range query.

Why Build It?

This application could provide value to a variety of users, but the user I am going to focus on is the hiker. As someone who hikes often, dealing with snow and ice can be frustrating, especially when traveling to low traffic locations. With most hikes, you generally acquire the starting elevation but finding out how much higher you will travel can be difficult. If you travel to too high of an elevation, the temperature will drop and you may find the sleeping bag you bought that is only rated for 32 degrees is suddenly insufficient to keep you warm. You may encounter unexpected snowfall that you are unprepared for, or the lake you wanted to fish at is frozen over. This application intends to solve some of these problems by providing an approximate elevation range for the hiking destination you are traveling to. The freezing elevation for a certain area is easily attainable, as is the coordinates of your location. This app will use both to provide additional information about the hike that will help ensure you are not met with unexpected obstacles when hiking.

Tools Used

  • Google Elevation API (retrieves elevation from a set of coordinates)
  • Google Static Maps API (retrieves a static map from Google)
  • Python (does back end computations with data received from APIs)
  • Django (imports Python data to a php page)
  • JavaScript (does front end computations with Python data)


  1. Create a website using HTML that accepts a coordinate query and a height
    • Example Form: Find Elevation of [ xx.x °N xx .x°W ] (coordinate location)
  2. Place limitations on the search query, including endpoints and error handling
  3. Use Python to interact with Google Maps API JSON data and return a map centered on the coordinate
  4. (test) Use Python to interact with Google Elevation API JSON data and return an elevation for the point
  5. Use Python to take the coordinate, and create a square grid of coordinates approximately equal height and width from each other
  6. Use Python to request the height of each point from Google Elevation API
  7. Compare each point elevation to the elation passed in the initial query
  8. Plot each point that passes the comparison test on the Google Map image using Django and JavaScript

(Example Elevation API JSON data)

Google API examples

Problems Encountered

My biggest issue with the Google Elevation API is their usage limits. They set three request limits on their service. 1) You can have a maximum or 2,500 requests per 24-hour period. 2) You can have a maximum of 512 locations per request. 3) You can have a maximum of 25,000 total locations per 24-hour period. Additionally, they set a limit on the parameter lengths; Elevation API URLs are restricted to 2048 characters.

These limits presented me with a couple issues when writing my program. Originally I wanted to use a grid of points about 1000x1000 in size then use that information to create a very detailed contour map. Unfortunately, one request would be take one million points and set me way over the limit. I adjusted my program to take 50x50 points. This allowed me to make 100 requests while staying within the limits of both the maximum amount of locations per request and the maximum total locations per 24-hour period.

Though initially I thought my 50x50 grid should work, I neglected to account for the URL length restriction of 2048 characters. After adjusting the size of the grid, I found that a maximum of about 50 points could be requested at once. You are able to request more using the connected points request method, but for what I was looking for you could request no more than a 7x7 grid. This allowed me to still create an elevation zone map, but no longer has the ability to be scaled up while maintaining high accuracy.

Potential Problems for Other Applications

Google requires the elevation data you request only be used in conjunction with displaying results on a Google map. It is stated that using elevation data without displaying a map for which elevation data was requested is prohibited. This limits a lot of fun app ideas using elevation data that do not require a map.


Elevation Zone Finder

The Application is deployed on Google's appspot and can be seen at this link