Vector tiles (vtiles) are small pieces of map data that allow for efficient rendering at varying zoom levels. Unlike raster tiles which are pre-rendered images, vector tiles contain attributes and geometric data that facilitate dynamic styling of map features on the fly, offering more flexibility and interactivity. PMTiles is a cloud-native file format that is designed for holding an entire collection of tiles, in this case vector tiles. The PMTiles format allows individual tiles to be queried directly from cloud object storage like Amazon S3. By querying directly from cloud storage, you no longer need to set up and manage dedicated infrastructure, reducing your costs and time-to-tile-generation.Documentation Index
Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
Use this file to discover all available pages before exploring further.
GenerationConfig
Parameters
The lowest zoom for which to generate tiles
The highest zoom for which to generate tiles
The resolution of the tiles to generate
The buffer (as a fraction) to apply to the tiles. The margin on a 1000 resolution tile with a buffer of .1 would be 100
A predicate Column for filtering features, optional
A Column for manipulating the array of features within a tile, optional
A Column for manipulating feature geometries, optional
The maximum number of features to include in each tile, optional
The frequency at which to cache the dataset, optional. E.g 2 means every 2nd zoom level. Default is 2
The storage level to persist the dataset at. Default is DISK_ONLY
The maximum size of the dataset from which to generate tiles, optional. If the dataset is larger than this, it will be reduced to this size by randomly sampling features
The number of partitions to use in tile generation. Default is 2x the number of worker cores
The frequency (ie number of zoom levels) at which to repartition the dataset. Default behavior not to repartition a certain zooms. Repartitioning helps when the geometries are large relative to the tiles, for example processing a collection of countries to zoom 16
Experimental, Unstable feature. Whether to replace polygons with a point in each tile the Polygon appears in. Default is false
generate()
Generates tiles from a set of features.
Parameters
The features to generate tiles from
The configuration for generating tiles
Returns
A Dataset of tiles ready to be output as MVTs
generatePMTiles()
Generates and writes PMTiles from a DataFrame of features.
VTiles.generate and VTiles.writePMTiles.
Parameters
The DataFrame of features to generate tiles from
The path to write the PMTiles file to
The configuration for generating tiles
The configuration for generating the PMTiles file
The storage level to cache the tiles DataFrame at. If None, the DataFrame will not be cached
getPMTilesConfigBuilder()
Retrieves a new PMTilesConfigBuilder for generating a PMTilesConfig.
Returns
A PMTilesConfigBuilder for generating a PMTilesConfig
getQuickConfig()
Retrieves a default GenerationConfig for generating tiles.
Returns
A default GenerationConfig for generating tiles
writePMTiles()
Writes a DataFrame of tiles to a PMTiles file.
Parameters
The dataframe of tiles to write. Output from the generate method
The path to write the tiles to. May be S3 or the local filesystem
A PMTilesConfig to write with the tiles. If not provided, a config will be generated from the featuresDf instead
A dataframe of the features the tilesDf was generated from. Used to generate a config from. If not provided, a config must be provided
The storage level to cache the tilesDf at. Default is DISK_ONLY. Providing None will not cache the tilesDf
Type Aliases
The VTiles object provides access to the following PMTiles-related types:PMTileType: Tile types supported by PMTiles formatPMTilesCompressionType: Compression types supported by PMTiles formatPMTilesConfig: Configuration for generating PMTilesPMTilesConfigBuilder: Builder for creating a PMTilesConfigPMTilesWriter: Writer for PMTiles files

