Skip to content

Get terrain altitude of Google Earth with GEP

You can use snoovel to share your tracks with the world. There are two ways to create a track, use a GPS record or create a route manually. For the second way we use a click listener to capture clicks on the globe. A click returns latitude and longitude coordinates, but no altitude value. This is not a big problem to display the route, because you can set “ALTITUDE_MODE_RELATIVE_TO_GROUND”. But we generate an elevation profile based upon the track. Finally we found the method getGroundOverlay in the class GeGlobe.

(getGroundOverlay) Returns the altitude for a given location on the globe. If the altitude data for the location has not yet been loaded, the return value is 0.

This method delivers us the altitude values, fine. I’m not an expert of law and the TOS of the API, but this is in my mind a way to scan an area and use the terrain data for “other services”. A Risk?

One Comment

  1. Thanx for the effort, keep up the good work Great work, I am going to start a small Blog Engine course work using your site I hope you enjoy blogging with the popular BlogEngine.net.Thethoughts you express are really awesome. Hope you will right some more posts.

Leave a Reply

Your email address will not be published. Required fields are marked *