I have a polyline in Google Earth.

I am able to see the elevation profile in Google Earth when I move along the polyline but is there a way to extract the lat,long and elevation data out to Excel?

  • 5
    My first thought is that depending on your intended use, this may violate the Google Terms of Service, as a derivative work. My second thought would be that it would be simpler to bring your polyline into ArcGIS, load in a Digital Elevation Model (DEM) from USGS, at The National Map and extract your elevations directly than doing a multi-step process out of GE. Commented Jun 25, 2012 at 21:30

2 Answers 2


The GEOCONTEXT-PROFILER will create an elevation profile just like Google Earth and you can import a KML and export a CSV. It should give you the same results as Google Earth.

This is the license restriction page that the tool links to.


The Google Elevation API can give you the elevation at any point on earth, so you can iterate across your polyline and get the elevation of each point:

https://maps.googleapis.com/maps/api/elevation/json?locations=39.7391536,-104.9847034|36.455556,-116.866667 :

   "results" : [
         "elevation" : 1608.637939453125,
         "location" : {
            "lat" : 39.7391536,
            "lng" : -104.9847034
         "resolution" : 4.771975994110107
         "elevation" : -50.78903579711914,
         "location" : {
            "lat" : 36.455556,
            "lng" : -116.866667
         "resolution" : 19.08790397644043
   "status" : "OK"

Up to 2,500 requests per day are available for free. Note that the terms of service require you to display any obtained results on a Google map, and calling the API from Excel or ArcGIS is likely to be a little complicated.

Not the answer you're looking for? Browse other questions tagged or ask your own question.