Tilemaker 2.0 has been released. Tilemaker is an application to generate vector maps (mbtiles) for displaying openstreetmap in-browser, in iOS apps or on Android. It generates these maps without having to setup any database, you can give it a osm.pbf file and convert it to mbtiles, using this command-line clients.

Please have a look here and enjoy a beautiful map as rendered by tilemaker: tilemaker.org. Tilemaker 2.0 has seen a lot of improvements lately, both performance wise, but also much better styling which improved map quality at lower zoom levels significantly.

Tilemaker has been developed with C++ (and some lua scripting). Over the last couple of months I have made a number of contributions to this open-source project to improve scalability and improve the rendered map quality.

The main contributions are:

  • An mmap allocator for the internal data-structures of tilemaker I have created an mmap based customer allocator for c++ data structures which allows existing datastructures (vector/map) to be stored on-disk using mmap. You can see this allocator in the 'osm_store'.

    It allows storing nodes/ways and relations on disk. This is the bulk of the openstreetmap data, when converting large areas (Country/Continent/Planet) this grows to many GB large. In older version this was stored in memory, not allowing tilemaker to convert large areas.

    Even with storing on-disk, tilemaker still needs significant RAM (several GB up to > 128GB when converting the full planet). osm_store.h osm_store.cpp

  • Parallel loading of pbf files Initially the tilemaker loading process of pbf was single-threaded. When converting large areas, this took significant time. This was made parallel, significantly reducing the loading process. The tile generation process of tilemaker was already parallel.

  • Fixing invalid geometries and self-intersection free polygon simplification Sometimes openstreetmap data contains invalid polygons: for example self-intersecting polygons, overlapping inners or other issues. These cause rendering issues when displaying the polygons. Also the simplification process of boost geometry may generate polygons with self-intersection.

    For fixing geometries the following approach was implemented: Geometry correct. And for simplification without self-intersection the following library: Geometry Simplify.

    Hopefully, these approaches will be incorporated into boost geometry someday, such that other projects can benefit from this as well. Work is being done already on integrating geometry correct.

Enjoy tilemaker 2.0

It seems tilemaker already had an active community even before making these changes, many users where happily generating maps. Now more people are starting to use tilemaker and people are scaling up the generated areas. Please consider tilemaker and openstreetmap if you ever need maps for your website/app.

Perfoming planet generation on big cloud servers has been done and where not possible before these improvements. An approach for how to do so is described here . So have a look at the tilemaker.org website or on github, and let me know if you find tilemaker useful.