Packages

object VTiles

A class for working with Vector Tiles. provide functionality for generating and writing *

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. VTiles
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class GenerationConfig(minZoom: Int = 0, maxZoom: Int = 15, tileResolution: Int = 4096, buffer: Double = 0.1, featureFilter: Option[Column] = None, tileFilter: Option[Column] = None, featureSimplify: Option[Column] = None, maxFeaturesPerTile: Option[Int] = Some(50000), cacheFrequency: Option[Int] = Some(2), persistStorageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK, maxDatasetSize: Option[Int] = None) extends Product with Serializable

    minZoom

    the lowest zoom for which to generate tiles

    maxZoom

    the highest zoom for which to generate tiles

    tileResolution

    the resolution of the tiles to generate

    buffer

    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

    featureFilter

    a predicate Column for filtering features, optional

    tileFilter

    a Column for manipulating the array of features within a tile, optional

    featureSimplify

    a Column for manipulating feature geometries, optional

    maxFeaturesPerTile

    the maximum number of features to include in each tile, optional

    cacheFrequency

    the frequency at which to cache the dataset, optional. e.g 2 means every 2nd zoom level. Default is 2

    persistStorageLevel

    the storage level to persist the dataset at. Default is DISK_ONLY

    maxDatasetSize

    the maximum number of features to use in tile generation. Useful for expediting tile generation. default is 50,000

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val PMTileType: TileType.type
  5. val PMTilesCompressionType: CompressionType.type
  6. val PMTilesConfig: tools.pmtiles.PMTilesConfig.type
  7. val PMTilesConfigBuilder: tools.pmtiles.PMTilesConfigBuilder.type
  8. val PMTilesWriter: tools.pmtiles.PMTilesWriter.type
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def generate(features: Dataset[Row], config: GenerationConfig = GenerationConfig()): Dataset[Row]

    Generates tiles from a set of features.

    Generates tiles from a set of features. The features must have a geometry column of the Geometry type and a layer column of string type represent what layer that feature belongs in. An optional Integer or Long column id can be included to persist an ID into the tiles. The features can be of any geometry type. The output dataset will have a tile column specifying the tile and a feature column containing clipped, simplified features that belong in that tile, projected into the [0..1] coordinate space of the tile for its x and y values.

    features

    the features to generate tiles from

    config

    the configuration for generating tiles

    returns

    a Dataset of tiles ready to be output as MVTs

  14. def generatePMTiles(features: Dataset[Row], path: String, config: GenerationConfig = GenerationConfig(), pmtilesConfig: Option[PMTilesConfig] = Option.empty, storageLevel: Option[StorageLevel] = Some(StorageLevel.MEMORY_AND_DISK)): Unit

    Generates and writes PMTiles from a DataFrame of features.

    Generates and writes PMTiles from a DataFrame of features. Wrapper over VTiles.generate and Vectortiles.writePMTiles.

    features

    : the DataFrame of features to generate tiles from

    path

    : the path to write the PMTiles file to

    config

    : the configuration for generating tiles

    pmtilesConfig

    : the configuration for generating the PMTiles file

    storageLevel

    : the storage level to cache the tiles DataFrame at. If None, the DataFrame will not be cached

  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. def getPMTilesConfigBuilder: PMTilesConfigBuilder

    Retrieves a new PMTilesConfigBuilder for generating a PMTilesConfig

    Retrieves a new PMTilesConfigBuilder for generating a PMTilesConfig

    returns

    a PMTilesConfigBuilder for generating a PMTilesConfig

  17. def getQuickConfig: GenerationConfig

    Retrieves a default GenerationConfig for generating tiles.

    Retrieves a default GenerationConfig for generating tiles. This configuration is optimized for quick (<5 minute on a Cairo cluster) tile generation. This is accomplished by generating lower zoom levels and higher resolutions, and limiting the number of features rendered to 100 million. Use with a renderer that supports overzooming is recommended. Be aware that these are effectively on up to zoom 10 tiles, so their low resolution will be evident at higher zoom levels.

    returns

    a default GenerationConfig for generating tiles

  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def writePMTiles(tilesDf: DataFrame, path: String, config: Option[PMTilesConfig] = Option.empty, featuresDf: Option[Dataset[Row]] = Option.empty, storageLevel: Option[StorageLevel] = Some(StorageLevel.DISK_ONLY)): Unit

    tilesDf

    the dataframe of tiles to write. Output from the generate method

    path

    the path to write the tiles to. May be S3 or the local filesystem

    config

    a PMTilesConfig to write with the tiles. If not provided, a config will be generated from the featuresDf instead

    featuresDf

    a dataframe of the features the tilesDf was generated from. Used to generate a config from. If not provided, a config must be provided

    storageLevel

    the storage level to cache the tilesDf at. Default is DISK_ONLY. Providing None will not cache the tilesDf

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped