OpenStreetMap evolved since many years. Millions of contributors are helping this project to grow everyday. Inspired by some of my friends, Karnataka and Ireland evolution projects, I wanted to vizualize different parts of the world.
Sri Lanka (January 2015 - July 2018)
Thailand (January 2008 - July 2018)
Bangladesh (January 2015 - April 2018)
Taiwan (January 2008 - July 2018)
Democratic Republic of the Congo (January 2016 - July 2018)
Peru (January 2010 - April 2018)
Ethiopia (January 2017 - July 2018)
Bhutan (January 2008 - April 2018)
I was able to create all the above animations based on their data size which were compatible with my computer memory. Most of these countries have datadump lesser than 200MB. If you want to create GIF's of your own, you can follow below steps:
Docker setup for Mac
- Signup for Docker hub, download it freely and install it.
- Test whether docker running correctly in terminal. To test quickly, run
docker run hello-world.
- Create an Ubuntu 16.04 container with
docker run -it ubuntu:xenial bash
Libosmium and dependencies installation
- Create a working directory (E.g: work)
mkdir workand update Ubuntu by running
- Install git
apt install gitand clone libosmium
git clone https://github.com/osmcode/libosmium.git
- Install libosmium dependencies. You can install all dependencies in one go
apt install -q -y cmake doxygen g++ graphviz libboost-dev libbz2-dev libexpat1-dev libgdal-dev libgeos++-dev libproj-dev libsparsehash-dev make ruby ruby-json spatialite-bin zlib1g-dev
- Install protozero by running
apt install libprotozero-dev
- Compile and build by following 5 steps:
cd libosmium mkdir build cd build cmake .. make
- If you want
utfcpplibraries to be installed along with libosmium itself when calling
make install, you have to use the CMake options
cmake -INSTALL_GDALCPP -INSTALL_UTFCPP ..
- At last call
ctestto run tests. If you dont get any errors, Congrats! your libosmium setup is complete!
- Clone osmium-contrib
git clone https://github.com/osmcode/osmium-contrib.gitto working directory.
- Change directory
- Install boost_filesystem and boost_program_options packages
apt install ibboost-filesystem-dev libboost-program-options-dev
- Now build by these 4 steps:
mkdir build cd build cmake .. make
- After building osmium-contrib, change directory to mapolution
- Install remaining dependencies one by one
apt install bc imagemagickand GDAL library
gdal_rasterizepackage by running
apt install libgdal-dev gdal-bin
- Install gifsicle
apt install gifsicle
- Now build mapolution:
mkdir build cd build cmake .. make
- You can switch to different handler:
cmake -DHANDLER=RoadsHandler ..This will filter only highways from the country extract. To get buildings, switch to
- Download any small country data from Geofabrik.
- Copy country data to container from host from a new terminal window
tar -cv <country.osh.pbf> | docker exec -i <container_name> tar x -C /home/work/osmium-contrib/mapolution/buildFor example:
tar -cv bhutan-internal.osh.pbf | docker exec -i practical_banach tar x -C /home/work/osmium-contrib/mapolution/build
- After copying to
builddirectory, run following command
./mapolution -s 2010-01-01 -e 2018-07-31 -S 30 country.osh.pbf(-s start date, -e end date, -S number of days) - This will create an
outdirectory where shapefiles were stored.
./rasterize.shto get final GIF output as
- Now, from another terminal window copy
anim.gifto host from container
sudo docker cp <container_id>:/home/work/osmium-contrib/mapolution/build/anim.gif .For example:
sudo docker cp fbb0afd5e095:/home/work/osmium-contrib/mapolution/build/anim.gif .
That's all! You've got animated OpenStreetMap evolution. Let me know if you could able to create one by these steps and post your result in comment. Happy mapping :)