January 3, 2015

Convert GPX Tracks to a HTML File With Info About Nearby Places

I have the habit to log my route when I’m traveling, hiking or sometimes even shopping in town. The GPX track is useful for geotagging photos or simply for understanding where I have been. Yesterday I had the idea to convert a GPX track to something that gives me an overview about interesting places nearby my track. So I fiddled a little with Python and wrote a script that

  • extracts the lat/lon coordinates from a GPX file
  • sends these coordinates to the Geonames database
  • extracts text from the Geonames reply
  • creates a very basic HTML page with some describing text about the interesting places nearby and a link to Wikipedia.

The result looks as follows:


The code is available on my Github. Besides the script you need the geopy python module and a login for Geonames.

© ho1ger 2015 - 2022