The homepage of gpx2map is located at:
https://sethdepot.org/gpx2map
The development is ongoing on Github
in the master branch,
Just fetch the latest version from here:
https://github.com/sd2k9/gpx2map
If you prefer having a version number or download an archive file,
use the
releases instead.
It could be out of date, so I suggest following the master branch instead.
gpx2map reads a gps track in GPX format (as produced by e.g. gpsbabel) and writes out an Google Map or OpenStreetMaps mash-up containing the route and additonal information. gpx2map can also show GPS-tagged photos along the map.
It comes very handy when you e.g. own an Garmin eTrex and want to know where you wandered around last time. Then you just use gpsbabel to fetch your tracks in GPX format and let gpx2map write out an map overlay for you.
HTML Include is put under the GNU General Public License Version 3.
gpx2map - Reads a gps track in GPX format and writes out an Google Map or OpenStreetMaps mash-up containing the route and additonal information Copyright (C) 2007-2010,2013,2014 Robert Lange This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see {http://www.gnu.org/licenses/}.
First of all Perl itself is needed, but also some packages
from CPAN.
The CPAN-Modules can be found at http://search.cpan.org
Chart::Gnuplot is required for drawing the graphs. When you don't want to use this feature this package is not needed.
Image::ExifTool and convert are required for adding geocoded images to the map. When you don't want to use this feature this package is not needed.
gpx2map is likely to work also with other versions than the one mentioned here. When you encounter problems just drop me a note.
Just copy (or link) the file gpx2map
into your path or any place you like.
Put the mash-up template files gpx2map.google.template
and
gpx2map.osm.template
where you put gpx2map itself (not to the link, in case you linked it).
The input file format is GPX.
You can get this e.g. by
gpsbabel (gpx2map includes a shortcut for calling
gpsbabel).
gpx2map then reads the GPX file
and writes out a html page containing either an Google or
OpenStreetMaps mash-up.
An GPX file can contain several tracks. You can select to write out only one specific track, merge all track points together or create one html file for each track.
Along the track also various graphs are generated. You can have a height
graph, a speed graph, a time graph and a temperature graph.
When the data of a speed sensor is available, these values are used,
otherwise average speed data is calculated.
For the temperature graph you need the
Garmin tempe sensor.
When requested, GPS-tagged (so called geocoded) pictures are shown
along with the track.
For all supplied pictures an icon version (48x48 size, add ".ico" before
the file suffix) and an shrinked version (640x640 size, add ".med" before
the file suffix) are created. The icons are then placed directly on the map
at the correct location. When you click these icons,
the shrinked pictures along with position and time when the shot was taken
are shown in an popup.
The described behaviour and defaults can be configured inside the script,
see section Configuration.
In case you don't have a camera with native GPS, you can use tools like gpscorrelate to add GPS-tags to your pictures. The tool takes your GPS track, compares the track time to the time stamps of the photos and adds the correlated position into the EXIF header.
gpx2map [--help|-h] [--version|-V] [--route|-r route] [--merge]
[--title|-t title] [--osm|-o]
[--[no]height] [--[no]tempe] [--[no]time] [--[no]speed]
[--outfile|-w file] inputfile [--pictures|-p img1 img2 ...]
--help, -h | Help screen |
--version, -V | Version |
--osm, -o | Create OpenStreetMaps Mash-Up |
Default is Google Mash-Up | |
--title, -t <title> | Title of web page, when not specified use route name (or leave empty) |
--route, -r <route> | Route to read |
--merge | Use all points from all routes in gpx file |
--outfile, -w <file> | For --route or --merge progessing the ouput path and base filename can be given |
--height|--noheight | Enable (Default) or Disable height profile |
--tempe|--notempe | Enable (Default) or Disable Temperature profile Data provided by Garmin Tempe sensor |
--time|--notime | Enable (Default) or Disable Time vs. distance profile |
--speed|--nospeed | Enable (Default) or Disable Speed profile |
--nographs | Disable all profile graphs, other profile options are ignored |
--pictures|-p img1 img2 ... | Place a shrinked version of these images on the map |
Pictures must include GPS coordinates | |
inputfile | GPX file to read |
Can be compressed with gzip, bzip2, lzma/xz |
When neither --route
nor --merge
are specified,
create individual web pages for each route.
Output is written to
<inputfile_without_suffix>[.<route>].html
For your convenience gpsbabel can be invoked over gpx2map. Just use the following command line:
gpx2map --babel outfile
You can change certain settings of gpx2map operation in the header of the executable. Just search for "global settings".
Most common settings - the others are documented in the script itself:
Have a look at my homepage for some examples:
https://sethdepot.org/site#Hiking
Please note that the maps are generated with the gpx2map version at their creation time and thus don't show all the features of the current version.
For picture placement to work you have to run gpx2map from the directory of the GPX file, and you cannot use absolute paths to pictures.
The browser compatibility could be improved.
gpx2map generated pages are tested sucessfully with Firefox and Chromium,
with most other (older) browsers you can expect drawbacks.
OpenStreetMaps Output for Picture placement is somewhat ugly and jumpy. I am still struggeling with the API and the lack of usable examples.
To run gpx2map on windows probably have to make the following adaptions:
In the sub height_profile_image add the line:
$filename =~ s{\\}{/}g;
In Gnuplot.pm, sub _execute, replace the line
my $gnuplot = 'gnuplot';
with
my $gnuplot = 'C:/gnuplot/bin/pgnuplot.exe';
When you want to contribute to gpx2map, just contact me.
The author is Robert Lange
If you have any questions, just write me.
Created by rola |
last modification: 2016-05-08 |