Public | Automated Build

Last pushed: 2 months ago
Short Description
osm2vectortiles generate-jobs
Full Description


The generate-jobs component is responsible creating JSON jobs consumed by the export component. It supports two types of jobs:

  • Pyramid: Job of rendering a tile pyramid (e.g. from z8 all down to z14). Used for initial rendering of the world.
  • List: Batch jobs of list of tiles to be rendered grouped by data locality. Used for rendering dirty tiles.

generate-jobs will output the jobs as individual JSON objects to stdout.
Use a tool like pipecat to schedule
them on your job server.


Generate pyramid jobs

  1. Search for to tile you want to render and choose a low zoom level tile. If you want to render the entire world use the z0 tile.
  2. Decide for a job zoom level. This is the zoom level at which generate-jobs will create pyramid jobs (e.g. for a z7 tile with job zoom level z8 four pyramid jobs for z8 will be generated)
  3. Run docker-compose run generate-jobs pyramid <x> <y> <z> --job-zoom=<job-zoom> generate the jobs. To store the jobs permanently pipe them into a file.

Generate list jobs

  1. Given you have a large file with tiles (best generated by the changed-tiles component) called tiles.txt in the ./export folder.
  2. Run ./docker-compose run generate-jobs python list /data/export/tiles.txt --batch-size=3000

Schedule Jobs on Message Server

  1. Install pipecat
  2. Set the AMQP connection options. If you are running the RabbitMQ server locally using docker-compose you can use export AMQP_URI=amqp://osm:osm@localhost:5672/
  3. Publish the jobs to the job queue with cat <job-file> | pipecat publish jobs.
Docker Pull Command
Source Repository