Make OpenStreetMap vector tiles without the stack
Tilemaker creates vector tiles (in Mapbox Vector Tile format) from an .osm.pbf planet extract, as typically downloaded from providers like Geofabrik. It aims to be 'stack-free': you need no database and there is only one executable to install.
Vector tiles are used by many in-browser/app renderers, and can also power server-side raster rendering. They enable on-the-fly style changes and greater interactivity, while imposing less of a storage burden. You can output them to individual files, or to a SQLite (.mbtiles) database.
Tilemaker is written in C++14. The chief dependencies are:
rapidjson, sqlitemoderncpp, and kaguya are bundled in the include/ directory.
You can then simply install with:
make sudo make install
For detailed installation instructions for your operating system, see INSTALL.md.
Tilemaker comes with configuration files compatible with the popular OpenMapTiles schema, and a demonstration map server. You'll run tilemaker to make vector tiles from your
.osm.pbfsource data. To create the tiles:
tilemaker --input /path/to/your/input.osm.pbf \ --output /path/to/your/output.mbtiles \ --config resources/config-openmaptiles.json \ --process resources/process-openmaptiles.lua
If you want to include sea tiles, then create a directory called
coastlinein the same place you're running tilemaker from, and then save the files from https://osmdata.openstreetmap.de/download/water-polygons-split-4326.zip in it, such that tilemaker can find a file at
Then, to serve your tiles using the demonstration server:
cd server ruby server.rb /path/to/your/output.mbtiles
You can now navigate to http://localhost:8080/ and see your map!
(If you don't already have them, you'll need to install Ruby and the required gems to run the demonstration server. On Ubuntu, for example,
sudo apt install sqlite3 libsqlite3-dev ruby ruby-devand then
sudo gem install sqlite3 cgi glug rack.)
Vector tiles contain (generally thematic) 'layers'. For example, your tiles might contain river, cycleway and railway layers. It's up to you what OSM data goes into each layer. You configure this in tilemaker with two files:
You can read more about these in CONFIGURATION.md.
The JSON configuration and Lua processing files are specified with
--processrespectively. Defaults are config.json and process.lua in the current directory. If there is no config.json and process.lua in the current directory, and you do not specify
--process, an error will result.
Read about tilemaker's runtime options in RUNNING.md.
You might also find these resources helpful:
You might use tilemaker if:
But don't use tilemaker if:
Bug reports, suggestions and (especially!) pull requests are very welcome on the Github issue tracker. Please check the tracker to see if your issue is already known, and be nice. For questions, please use IRC (irc.oftc.net or https://irc.osm.org, channel #osm-dev) and https://help.osm.org.
Formatting: braces and indents as shown, hard tabs (4sp). (Yes, I know.) Please be conservative about adding dependencies or increasing the memory requirement.
Tilemaker is maintained by Richard Fairhurst and supported by many contributors.
Copyright tilemaker contributors, 2015-2021. The tilemaker code is licensed as FTWPL; you may do anything you like with this code and there is no warranty. The included rapidjson (Milo Yip and THL A29) and sqlitemoderncpp (Amin Roosta) are MIT; kaguya is licensed under the Boost Software Licence.