GenerationConfig
Parameters
Int
default:"0"
The lowest zoom for which to generate tiles
Int
default:"15"
The highest zoom for which to generate tiles
Int
default:"4096"
The resolution of the tiles to generate
Double
default:"0.1"
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
Option[Column]
default:"None"
A predicate Column for filtering features, optional
Option[Column]
default:"None"
A Column for manipulating the array of features within a tile, optional
Option[Column]
default:"None"
A Column for manipulating feature geometries, optional
Option[Int]
default:"Some(50000)"
The maximum number of features to include in each tile, optional
Option[Int]
default:"Some(2)"
The frequency at which to cache the dataset, optional. E.g 2 means every 2nd zoom level. Default is 2
StorageLevel
default:"StorageLevel.MEMORY_AND_DISK"
The storage level to persist the dataset at. Default is DISK_ONLY
Option[Int]
default:"None"
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
Option[Int]
default:"None"
The number of partitions to use in tile generation. Default is 2x the number of worker cores
Option[Int]
default:"None"
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
Boolean
default:"false"
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
Dataset[Row]
required
The features to generate tiles from
GenerationConfig
default:"GenerationConfig()"
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
Dataset[Row]
required
The DataFrame of features to generate tiles from
String
required
The path to write the PMTiles file to
GenerationConfig
default:"GenerationConfig()"
The configuration for generating tiles
Option[PMTilesConfig]
default:"Option.empty"
The configuration for generating the PMTiles file
Option[StorageLevel]
default:"Some(StorageLevel.MEMORY_AND_DISK)"
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
DataFrame
required
The dataframe of tiles to write. Output from the generate method
String
required
The path to write the tiles to. May be S3 or the local filesystem
Option[PMTilesConfig]
default:"Option.empty"
A PMTilesConfig to write with the tiles. If not provided, a config will be generated from the featuresDf instead
Option[Dataset[Row]]
default:"Option.empty"
A dataframe of the features the tilesDf was generated from. Used to generate a config from. If not provided, a config must be provided
Option[StorageLevel]
default:"Some(StorageLevel.DISK_ONLY)"
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

