GPX

When tracking my movements on the sea, I fell into a pitfall: The tracking software’s default setting sets tracking points as often as it can. That means a couple of times per minute. On a 22km tour with the kayaks that ended up in roughly 31k tracking points and a 4.3MB file. Many Sites I tried have an upload limit of one to three megabytes or work completely differently: You can mark your way, but you can’t upload your GPX tracking file. Annoyingly the upload limit has more likely its origin in the http protocol than in the functionalities of the GPX rendering.

While searching around I found Thomas Fischer’s Weblog with a link to a perl script that would do all this offline by downloading the needed tiles from different sources, putting them together and creating an overview for it: gpx2png.pl.

By just simply running it after installing the necessary dependencies in CPAN it created a map file for me.

$ perl gpx2png.pl input.gpx

The script needs to be called with the perl interpreter in front of it. That’s against my currently habits, but I can fix that later. So it also provides a lot of helpful explanation and additional parameter:

This script is called like
  perl gpx2png.pl [OPTIONS] [GPXFILES]

Available options (all optional, default values will be used if not specified)
  -o FILENAME   Output filename of the image. Default: map.png
  -z N          Zoom level (number or "auto"). Default: auto
  -a N          Autozoom: Do not use more than N tiles to draw tracks. Default: 32
  -b N          Additional map image tiles around the map. Default: 0
  -c N          Cut final map to have N pixels around the drawn tracks. Default: none
  -r N          Radius for waypoint circles. Default: auto
  -A            Create animation steps by saving individual images
                for each drawn track. Default: off
  -t SOURCE     Select the source of image tiles. Possible values for SOURCE:
                   standard   (default)
                   cyclemap
                   transport
                   opnvkarte
                   mapquest
                   toner
                   toner-lines
                   white (no tiles, uses grayscale drawing)
                   transparent (no tiles, uses grayscale drawing)
  -s            Sparse mode: Include only tiles touched by GPS tracks. Default: off
  -q            Quiet mode: Do not print status output. Default: off
  -j FILENAME   Show thumbnail of JPEG photo at the position as determined
                by GPS coordinates in EXIF tag. Multiple -j options possible
  -J N          Set size of JPEG photo thumbnails. Default: 128
  -i FILENAME   Draw icons along a track like a dotted line
                Icons are rotated towards track's direction, up is forward
  -I N          Distance between the center of two subsequent icons. Default: 20

GPS tracks (format .gpx) are passed as a list of filenames,
or the .gpx files' content is piped into gpx2png.pl