Expanding the before/after map creation for OpenStreetMap

a gif showing how a map develops over four time points, with increasingly many buildings and POIs appearing

A small map-extract of Venado Tuerto over four time points in 2024, showing the addition of buildings and POI.

tl;dr: One can now create >2 frames in the OSM comparison GIF. And the MyBinder version can download OSM history files, no local up/downloads needed. Just click here to launch it.

In the last post I wrote about working on making it easier to create before/after maps for OpenStreetMap, based on Amanda McCann’s bash-pipeline. Since then, Amanda, Ian Dees, Máté Gyöngyösi, and I have put in some more effort to further improve both the features and the accessibility of the pipeline.

A long-standing request was the creation of time-lapse GIFs, that create a sequence of updates with in-between time-points instead of just the before/after. Ian did an amazing job at adding support for this, as you can see in the GIF above showing 4 time points. Beyond selecting a start & end-date, one can now pick the number of frames that should be generated between those dates (with the default being 2, to maintain the original behavior).

Another improvement relates to the downloading of the OSM history file. Depending on the area of interest, those files can be quite big, which is particularly cumbersome for the MyBinder version, as so far it required first downloading the file to ones own machine, to then upload it into the container. This step was so far necessary, as Geofabrik only makes these files accessible to OSM-contributors after a log-in step.

Luckily, Geofabrik happens to provide a small Python library for logging in. Máté and I implemented this into the container and corresponding Jupyter Notebook, thus allowing the download right in the running container, including on MyBinder. If one trusts the MyBinder environment (which e.g. I would do), one can simply enter the OSM username/password. If one is a bit less trusting, one can alternatively upload the time-limited Geofabrik-cookie instead, which is a bit less comfortable but doesn’t require sharing the login-details.

And last but not least, the building of the Docker container is now automated, with the latest versions being automatically released to the GitHub container registry.

With that: happy mapping and visualizing. And if you end up using this, please share some of the resulting images on Mastodon (or your social media of your choice) with the #openstreetmap tag!

Bastian Greshake Tzovaras

Bastian Greshake Tzovaras

Generally, things are better if you put open* in front of them.

orcid scholar rss facebook twitter github youtube mail spotify instagram linkedin flickr mastodon