
If you trace a line in google earth then save it out as KML it will not have altitude data. This annoying because often GPS logs are not really accurate enough to make a nice map. I was the wanting to plot a section (elevation chart) from the traced KML. For example the site tracks.org.nz has a lot of these traced KML files on it.
It turns elevation data can be extracted via the google earth api. (god knows why its not written out to the KML in the first place). So I wrote a script to automate writing the elevation to KML files.
It needs the following to be already installed.
It seems the pygoogleearth project is a bit bung and requires a minor modification to work
Replace this line:
return gehelper.point_dict_from_terrain_point(terrain_point)
With this line:
return terrain_point
Script attached (rename to ele_lookup.py)
The script works by using the COM api in google earth and "drives" the camera round the course of the KML its kinda funny to watch. (for low values of "funny")
you should put it on github
you should put it on github
Done, Get elevation data
Done, Get elevation data script on github... here
Post new comment