Seed
A helper command to allow you to prepopulate your cache with prerendered tiles. This is especially useful when adding a new layer to tilegroxy that is slow to render the furthest out zoom levels and you want to avoid your first end-users running into this slowness. This command is roughly equivalent to standing up a server using the `serve` command and then hitting the layer endpoint with `cURL` requests for all the tiles you want.
The same command can also remove cached tiles with the --purge flag. A purge walks the same layer, bounding box and zoom levels a seed would but deletes the matching cache entries instead of populating them.
|
Usage
Full, up-to-date usage information can be found with tilegroxy seed -h.
tilegroxy seed -hPre-populates the cache for a given layer for a given area (bounding box)
for a range of zoom levels.
Be mindful that the greater the zoom level (the more you "zoom in"),
exponentially more tiles will need to be seeded for a given area. For
instance, while zoom level 1 only requires 4 tiles to cover the planet,
zoom level 10 requires over a million tiles. As a safety precaution, a
limit of 10k tiles is applied unless you specify --force.
Pass --purge to delete the tiles covering the same area instead of
populating them. Purging makes no requests against upstream providers,
so it isn't subject to the --force tile limit.
Seed jobs can be resumed automatically by specifying a file with the --progress flag. Job progress will be written to that file as we go. Interrupting the command and then running the exact same command again, will start off more-or-less from where things left off. The file will be overwritten with progress and should get deleted once done.
Usage:
tilegroxy seed [flags]
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
|
string |
Seed into the cache with this ID instead of the one the layer normally uses. |
|
|
bool |
|
Perform the seeding even if it covers an excessive number of tiles. Without this flag seeds over 10k tiles will error out. Warning: A seed that large can spend hours making requests against an upstream provider |
|
bool |
|
help for seed |
|
string |
The ID of the layer to seed |
|
|
uint64 |
How many tiles can fail to render before the seed gives up and exits with a failure status. Defaults to the number of tiles being seeded, meaning the seed only fails if every tile does |
|
|
float32 |
|
The maximum latitude to seed. The north side of the bounding box |
|
float32 |
|
The maximum longitude to seed. The east side of the bounding box |
|
float32 |
|
The minimum latitude to seed. The south side of the bounding box |
|
float32 |
|
The minimum longitude to seed. The west side of the bounding box |
|
string |
A file to use to record how far the seed got. If the file already exists the seed resumes from its recorded position instead of starting over. |
|
|
bool |
|
Delete the cached tiles covering the given area and zoom levels instead of populating them. |
|
string |
The tenant ID to seed as, standing in for what authentication would supply on a real request. Required to seed a specific tenant’s tiles when using a tenant cache |
|
|
uint16 |
|
How many concurrent requests to use to perform seeding. Be mindful of spamming upstream providers |
|
string |
The user ID to seed as, standing in for what authentication would supply on a real request |
|
|
bool |
|
Output verbose information including every tile being requested and success or error status |
|
uints |
|
The zoom level(s) to seed |