As an example we'd like to render tiles for tile level 13, 15 and 17 of San Francisco. First you need the osm.pbf file for that region. In our case we download that from:
or to be more specifically: http://download.geofabrik.de/north-america/us/california-latest.osm.pbf
Now we need the tools for conversion and filtering the pbf file into tiles. In order to compile the tools you should have zlib installed on your system (e.g. via sudo apt-get install zlib1g-dev). Then run:
cd /tmp wget http://m.m.i24.cc/osmconvert.c gcc -O3 -o osmconvert osmconvert.c -lz sudo mv osmconvert /usr/local/bin and pretty much the same for osmfilter wget http://m.m.i24.cc/osmfilter.c gcc -O3 -o osmfilter osmfilter.c sudo mv osmfilter /usr/local/bin
if that works, running
should output usage instructions.
Now our tool is needed. You need python version 2 or 3 to be installed. In a shell, go to the marble sources directory and then
should give usage instructions.
The tile cutter tool works as follows: You call it with a region file as parameter (or several). It will generate tiles in the currenty directory unless you use the -d option: For example -d ~/.local/share/marble/maps/earth/vectorosm is what you want for local tiles. By default it will generate tiles for zoom levels 13, 15, 17. You can overwrite that using the -z switch -z 13 15.
for example to exclude level 17 (which takes looong for large regions) once called, the script does the following
Then it calls osmconvert for each tile to generate the tile