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
- 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.
- 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)
docker-compose run generate-jobs generate_jobs.py pyramid <x> <y> <z> --job-zoom=<job-zoom>generate the jobs. To store the jobs permanently pipe them into a file.
Generate list jobs
- Given you have a large file with tiles (best generated by the changed-tiles component) called
./docker-compose run generate-jobs python generate_jobs.py list /data/export/tiles.txt --batch-size=3000
Schedule Jobs on Message Server
- Install pipecat
- Set the AMQP connection options. If you are running the RabbitMQ server locally using
docker-composeyou can use
- Publish the jobs to the job queue with
cat <job-file> | pipecat publish jobs.