Since my Istanbul to Ireland trip, I’ve had on my Projects list creating an animated map of the trip, “Indiana Jones” style.
There are a few methods for creating an animated map by merging a image of the map with no route, and an image of the map with the route. They work best for mapping a consistent East-to-West route, which doesn’t always align to my meandering.
Since I last looked into this, another project had me creating animated GIFs of game data output:
Occurred to me I could accomplish my cycling map goal via brute force, making individual images, and then creating an animated GIF using the same process. I decided to test using my much-shorter C&O Canal trip. I created an image of the map without my cycling on it, named map000.png. Then I added a red dot, and saved it as map001.png, added another dot (savinf as map002.png), etc. From there it was just a question of turning the problem over to ImageMagick to convert the images into an animated GIF, and then smooth things out a bit to reduce the file size:
convert -loop 1 -delay 100 “map*.PNG” map.gif
mogrify.exe -layers optimize -fuzz 6% map.gif
Success, if painful for manually creating 148 images:
Looking for less manual options, I looked at RouteGenerator. I stumbled across RouteGenerator several years ago, but it didn’t quite do what I want. However, after a few updates, RouteGenerator now permits importing a GPX path, making it a lot easier to use.
I used RidewithGPS back in 2015 to create my original fixed map:
RidewithGPS permits exporting a GPX track (all 15.4 GB of it!). I’d saved my original efforts, so getting the GPX was quick.
RouteGenerator v 1.19.1 is buggy (perhaps due to the size of the GPX file?). Through multiple crashes I eventually managed to import my GPX file, save a map image, and export the entire thing as a MP4 file (formats supported also include AVI, MKS, MPG). Looking at the inner workings, RouteGenerator works similarly to my original brute force method, saving hundreds of BMP files (625 to be exact) to a folder, then converts them (internally) to video using ffmpeg.
I wanted an animated gif, but with the images, a quick modification of the earlier ImageMagik commands from my C&O trip converted the RouteGenerator *.bmp files to an animated gif.
If I wanted to make individual customizations, I could dig through the individual files, change them manually, and regenerate the GIF. At this point I’ve accomplished what I wanted.
I did convert all the individual .bmp files to gifs for (smaller) long-term storage:
convert map00000.bmp map00000.gif
convert map00001.bmp map00001.gif
…
Hopefully that’s useful to someone else!