Trait

vectorpipe.vectortile

Pipeline

Related Doc: package vectortile

Permalink

trait Pipeline extends AnyRef

The interface governing the transformation from processed OSM dataframes to vector tiles.

After loading an OSM source and transforming via OSM.toGeometry and any filtering/modification steps, one may want to output a set of vector tiles from the remaining geometry and metadata. The vector tile output process is governed by a Pipeline definition that describes how to convert a data frame into a set of vector tiles and how to pass information to subsequent zoom levels.

[It is worth noting that nothing in this interface restricts the input data to having originated from OSM. Any DataFrame containing a column of JTS geometry is a valid target.]

This API treats vector tile generation as an inherently hierarchical process governed by a series of operations. Every zoom level will be addressed in the same way, and the sequence of operations can be depicted schematically as below:

┌──────────┐ │ Zoom z-1 │ └──────────┘ ↑ simplify ↑ reduce ↑ ╔══════════╗ ┌─────────────┐ ║ Zoom z ║ → select → clip → pack → │ VECTOR TILE │ ╚══════════╝ └─────────────┘

Each of these operations is documented below. The only extra note is that reduce and simplify will be called prior to processing the initial zoom level.

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

Abstract Value Members

  1. abstract val baseOutputURI: URI

    Permalink

    The root URI for output.

  2. abstract val geometryColumn: String

    Permalink

    Name of the column containing the JTS geometry.

  3. abstract val layerMultiplicity: LayerMultiplicity

    Permalink

    Declaration of layer generation style.

    Declaration of layer generation style.

    Some pipelines are simple and require a single layer in the output vector tile, while others require multiple layers. This value is used by pipelines to declare how layers are generated. In the simplest case, derived pipelines should declare val layerMultiplicity = SingleLayer(layerName) in their definition. This will cause all geometries to be written out to the layer layerName. For more complex vectortile sets, one may set val layerMultiplicity = LayerNameInColumn(colName); this will require that the custom pipeline create a column of name colName containing String layer names where the different classes of geometries will be found. Each named layer will be collected separately and aggregated per spatial key into a vectortile.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clip(geom: Geometry, key: SpatialKey, layoutLevel: LayoutLevel): Geometry

    Permalink

    Clip geometries prior to writing to vector tiles.

    Clip geometries prior to writing to vector tiles.

    It may be desirable to carry only the portion of a geometry that intersects a given vector tile to keep down memory usage. This function can be used to implement such schemes.

    Basic (non-no-op) clipping functions can be found in Clipping.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. def pack(row: Row, zoom: Int): VectorTileFeature[Geometry]

    Permalink

    Convert table rows to output features.

    Convert table rows to output features.

    A straightforward conversion from a table row to a geometric feature. The data carried by the feature are stored as entries in a Map[String, Value]. See geotrellis.vectortile.Value for details.

  17. def reduce(input: DataFrame, layoutLevel: LayoutLevel, keyColumn: String): DataFrame

    Permalink

    Reduce the input data between zoom levels.

    Reduce the input data between zoom levels.

    Not all data is useful in all levels of the vector tile pyramid. When a geometry will no longer be used in any subsequent generated level, it may be desirable to drop the relevant rows from the DataFrame to limit the amount of working data. Moreover, it may be desirable to collect multiple entities into a single, aggregated entity. These sorts of operations are made possible by the reduce function.

    This function will be called once before tile generation begins at the initial zoom level. Before this initial call, the geometry in each row will have been automatically keyed to the given layout—that is, the list of spatial keys that the geometry intersects will have been constructed and made available in the column labeled keyColumn.

    input

    A DataFrame minimally containing a "geom" field of JTS Geometry and a field of Array[SpatialKey] with the name given by the keyColumn param, below

    layoutLevel

    The layout level for the target zoom

    keyColumn

    The name of the column containing Array[SpatialKey] giving the list of keys that the geometry interacts with

  18. def select(input: DataFrame, targetZoom: Int, keyColumn: String): DataFrame

    Permalink

    Select geometries for display at a given zoom level.

    Select geometries for display at a given zoom level.

    VectorPipe allows geometries to be carried up the pyramid for display at a later time. This function is used to choose the elements that will be displayed at the target zoom level. This is useful for implementing a display schema, or for example, selection based on prominence. VectorPipe will add a column of Array[SpatialKey] in the column with the name given by keyColumn. These keys identify the layout tiles which intersect each geometry at the current zoom level. This information may be useful when deciding which geometries to display.

    If layerNameIsColumn is true, the resulting DataFrame must supply a String-typed column of the name contained in layerName to indicate which layer a geometry belongs in.

  19. def simplify(g: Geometry, layout: LayoutDefinition): Geometry

    Permalink
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped