Features
In this tile provider, the tiles in Mapbox Vector Tiles format are derived from a Feature Provider.
Configuration
Name | Default | Description | Type | Since |
---|---|---|---|---|
id | Unique identifier of the entity, has to match the filename. Allowed characters are (A-Z, a-z), numbers (0-9), underscore and hyphen. | string | v2.0 | |
providerType | Always TILE . | string | v2.0 | |
providerSubType | Always FEATURES . | string | v2.0 | |
auto | false | Option to generate missing definitions automatically from the data source. | boolean | v2.0 |
autoPersist | false | Deprecated, use the editor instead. Option to persist definitions generated with auto to the configuration file. The Store must not be READ_ONLY for this to take effect. | boolean | v2.0 |
tilesetDefaults | Defaults for all tilesets , see Tileset Defaults. | object | v3.4 | |
layerDefaults | Deprecated See tilesetDefaults . | object | v3.4 | |
tilesets | {} | Definition of tilesets, see Tileset. | object | v3.4 |
layers | {} | Deprecated See tilesets . | object | v3.4 |
caches | [] | List of cache definitions, see Cache. | array | v3.4 |
seeding | {} | Controls how and when tiles are precomputed, see Seeding. | object | v3.4 |
Tileset Defaults
Defaults that are applied to each Tileset.
Name | Default | Description | Type | Since |
---|---|---|---|---|
center | { lon: 0.0, lat: 0.0 } | Longitude and latitude that a map with the tiles should be centered on by default. | object | v3.4 |
featureLimit | 100000 | Maximum number of features contained in a single tile per query. | number | v3.4 |
minimumSizeInPixel | 0.5 | Features with line geometries shorter that the given value are excluded from tiles. Features with surface geometries smaller than the square of the given value are excluded from the tiles. The value 0.5 corresponds to half a "pixel" in the used coordinate reference system. | number | v3.4 |
ignoreInvalidGeometries | false | Ignore features with invalid geometries. Before ignoring a feature, an attempt is made to transform the geometry to a valid geometry. The topology of geometries might be invalid in the data source or in some cases the quantization of coordinates to integers might render it invalid. | boolean | v3.4 |
transformations | {} | Transform the selected features for a certain zoom level. Supported transformations are: selecting a subset of feature properties ( properties ), spatial merging of features that intersect (merge ), with the option to restrict the operations to features with matching attributes (groupBy ). See the example below. For merge , the resulting object will only obtain properties that are identical for all merged features. | object | v3.4 |
featureProvider | null | The id of the feature provider. By default the tile provider id without -tiles is used. | string | v3.4 |
levels | { "WebMercatorQuad" : { "min": 0, "max": 23 } } | Controls the zoom levels available for each active tiling scheme as well as which zoom level to use as default. | object | v3.4 |
Tileset
All options from Tileset Defaults are also available and can be overriden here.
Name | Default | Description | Type | Since |
---|---|---|---|---|
id | The tileset id. | string | v3.4 | |
featureType | null | The name of the feature type. By default the tileset id is used. | string | v3.4 |
combine | [] | Instead of being generated using a featureType , a tileset may be composed of multiple other tilesets. Takes a list of tileset ids. A list with a single entry * combines all tilesets. | array | v3.4 |
filters | {} | Filters to select a subset of feature for certain zoom levels using a CQL filter expression, see example below. | object | v3.4 |
Cache
There are two different cache types:
IMMUTABLE
An immutable cache can only be created through seeding. It will only be made available once it is complete. If some or all tiles are re-seeded, then again the new version will only be made available once it is complete. In the meantime the old version is still provided to consumers.
Therefore an immutable cache is always consistent and, once the initial seeding has completed, it guarantees uninterrupted operation.DYNAMIC
A dynamic cache can be computed through seeding, but it will also cache matching tiles that are requested by a consumer. Tiles will be made available as soon as they are computed. If some or all tiles are re-seeded, they are deleted first.
Therefore a dynamic cache might be inconsistent and may cause client errors during (re-)seeding.
In general the usage of immutable caches is recommended. For higher zoom levels a complementary non-seeded dynamic cache might make sense to reduce seeding time.
There are two different storage types:
PLAIN
Every tile is stored in a single file. This is recommended for remote storage (coming soon).MBTILES
Tiles are stored in a MBTiles file per tiling scheme. This is recommended for local storage.
Name | Default | Description | Type | Since |
---|---|---|---|---|
type | Either IMMUTABLE or DYNAMIC . | string | v3.4 | |
storage | Either PLAIN or MBTILES . | string | v3.4 | |
seeded | true | Should this cache be included by the Seeding? | boolean | v3.4 |
levels | {} | Tiling schemes and zoom levels that should be stored in the cache. Applies to all tilesets that are not specified in tilesetLevels . | object | v3.4 |
tilesetLevels | {} | Tiling schemes and zoom levels for single tilesets that should be stored in the cache. | object | v3.4 |
Seeding
Controls how and when caches are computed.
Name | Default | Description | Type | Since |
---|---|---|---|---|
runOnStartup | true | If disabled the seeding will not be run when the API starts. | boolean | v2.0 |
runPeriodic | null | A crontab pattern to run the seeding periodically. There will only ever be one seeding in progress, so if the next run is scheduled before the last one finished, it will be skipped. | string | v2.0 |
purge | false | If enabled the tile cache will be purged before the seeding starts. | boolean | v2.0 |
maxThreads | 1 | The maximum number of threads the seeding is allowed to use. The actual number of threads used depends on the number of available background task threads when the seeding is about to start. If you want to allow more than thread, first check if sufficient background task threads are configured. Take into account that the seeding for multiple APIs will compete for the available background task threads. | number | v2.0 |
Example
id: vineyards-tiles
providerType: TILE
providerSubType: FEATURES
caches:
- type: IMMUTABLE
storage: MBTILES
levels:
WebMercatorQuad:
min: 5
max: 12
- type: DYNAMIC
storage: MBTILES
seeded: false
levels:
WebMercatorQuad:
min: 13
max: 18
tilesetDefaults:
levels:
WebMercatorQuad:
min: 5
max: 18
tilesets:
__all__:
id: __all__
combine: ['*']
vineyards:
id: vineyards