Seed
A helper command to allow you to prepopulate your cache with prerendered tiles. Useful when a new layer is slow to render the furthest out zoom levels.
| 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 |
Global flags
The following global flags are available for supplying your configuration:
-c, --config string A file path to the configuration file to use.
The file should have an extension of either
json or yml/yaml and be readable.
(default "./tilegroxy.yml")
--remote-endpoint string The endpoint to use to connect to the remote
provider (default "http://127.0.0.1:2379")
--remote-path string The path to use to select the configuration
on the remote provider
(default "/config/tilegroxy.yml")
--remote-provider string The provider to pull configuration from.
One of: etcd, etcd3, consul, firestore, nats
--remote-type string The file format to use to parse the configuration
from the remote provider (default "yaml")