Resizing the OpenStreetMap Planet EBS in Amazon's Cloud


2 min read

Every week I take a snapshot of the OpenStreetMap planet, import it into a PostGIS database, and then release it publicly as an EBS. The idea is that the process for keeping a mirror of all OpenStreetMap data is tough and shouldn’t be required for people who just want to render cool maps.

This is an enormous amount of geographic data. To put it in perspective, last week’s planet was bzip2 compressed at 7.4GB, unzipping to 116GB, and occupying 113GB in a PostGIS database. The process of importing the data is very serious: even with a large Amazon instance which lets me allocate five gigabytes of RAM for the importer, the initial load takes over 29 hours. Of course, the upshot to this long haul is that subsequent updates can be handled with the cool tools the OpenStreetMap project has developed to merge diffs. This wiki page on updating in intervals is a hidden treasure for those looking to keep up their own OpenStreetMap sites.

The last update took a long time to complete because I didn’t realize how fast the database would grow: old snapshots were constricted to 100 gigabytes, while the new one is 150 gigabytes, giving it a bit more headroom. This ‘problem’ of running out of space on the EBS brings up the really exciting fact that OSM is growing fast.

Here’s a graph of recent growth in nodes: which include curves in roads, points of interest, and lots more. Growth here is boosted by large data imports but also individual users contributing their local business locations with tools like MapZen.

832434035bc9  0HvH XUPxYgot euc

The number of new users joining OpenStreetMap is even more encouraging for future growth. Their individual expertise and connections with local government and business mean that OpenStreetMap can become hyperlocal and precise, as well as authoritative.

832434035bc9  0kkXIXwsnNak l43l

Here’s a look at the increase in ways, which include roads, boundaries, and features like lakes and buildings. Involved imports like MassGIS in Boston have significantly boosted numbers in these details.

832434035bc9  0TslU4M7UeydovJON

The new OpenStreetMap Planet on EBS is available as a public snapshot. If you’re using AWS, you can create a volume with the id ‘snap-25c1a34c’ and attach it to a Linux instance (like a MapBox AMI instance) and start rendering and using OpenStreetMap data in a jiffy. You can follow the same directions that are posted on Amazon to set up a new PostGIS database easily.

What we're doing.