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[1]
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[1].
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[1].
Since then, Amanda, Ian Dees[1], Máté Gyöngyösi[2], and I have put in some more effort to further improve both the features and the accessibility of the pipeline.
A long-standing request[1] 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[1].
1: 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[1].
1: 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!