Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimizing openmaptiles and servers for planet tiles generation

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

like image 702
Quentin Lerebours Avatar asked Sep 20 '25 05:09

Quentin Lerebours


1 Answers

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.

like image 196
Quentin Lerebours Avatar answered Sep 23 '25 14:09

Quentin Lerebours