3

I'm currently using openmaptiles in order to generate planet tiles (zoom 0 to 14 or 15). This is a long process that I plan run on dedicated servers. I know that this is a service offered by openmaptiles but I can't afford spending $1200 or $1000 to generate or buy the tiles.

It's written in the README of openmaptiles project that the quickstart.sh isn't optimized for planet rendering. This is why I'd like to know how I could optimize the configuration to make it as fast as possible. To be clear, I will use mbutils to generate tiles from mbtiles file, allowing me to run the planet generation on different servers with different zoom levels (i.e zoom 1 to 9 on a first server, and 10 to 14 on another one). This way, I will collect different mbtiles files that I will use to generate and merge .pbf tiles with mbutils.

I read an issue but it didn't change anything for me. Maybe I can also remove some layers that won't be used on my map ? (How to do that ?) ATM, when I run a script, it doesn't seem that it's using the full CPU capacities.

Thanks for your help

  • 1
    If you hardware setup is restrictive for generating whole planet, generate segments and join them (with tile-join), I had to do that. – PetrV Oct 03 '19 at 00:06

2 Answers2

4

I found a way to accelerate the process: Make a PR of openmaptiles/generate-vectortiles repo that contains the dockerfile of the main container for this project. In the background, this container uses mapbox's tilelive project that allows to split a big job in smaller ones. I added two environment variables:

  • JOBS: The number of job it should be splitted in
  • JOB_NUM: The job number to run

The fork is here: https://github.com/qlerebours/generate-vectortiles

It allows to paralellize the process if you have multiple servers to generate this.

2

you can restrict layers returned by modifying: https://github.com/openmaptiles/openmaptiles/blob/master/openmaptiles.yaml

Inside openmaptiles.yaml - reduce the layers entry so it contains the only layers that you require.

For example, I only required building data so I changed the file so that the layers section only contained the following.

layers: - layers/building/building.yaml

I worked this out by going through the history of the openmaptiles repository. It worked for me.

Hope this helps! If you find another ways to speed up the process, it would be good to share!

Thanks -Rufus

Rufus Mall
  • 569
  • 4
  • 14