Package

geotrellis.vectortile

protobuf

Permalink

package protobuf

Visibility
  1. Public
  2. All

Type Members

  1. case class LazyProtobufLayer(rawLayer: internal.vector_tile.Tile.Layer, tileExtent: Extent) extends ProtobufLayer with Product with Serializable

    Permalink

    A Layer decoded from Protobuf data.

    A Layer decoded from Protobuf data. All of its Features are decoded lazily, making for very fast extraction of single features/geometries.

  2. trait ProtobufLayer extends Layer

    Permalink

    The parent trait for a two-variety sum type for ProtobufLayers: Lazy and Strict.

  3. case class ProtobufTile(layers: Map[String, ProtobufLayer], tileExtent: Extent) extends VectorTile with Product with Serializable

    Permalink

    A concrete representation of a VectorTile, as one decoded from Protobuf bytes.

    A concrete representation of a VectorTile, as one decoded from Protobuf bytes. This is the original/default type for VectorTiles.

    import geotrellis.vectortile.protobuf._
    
    val bytes: Array[Byte] = ...  // from some `.mvt` file
    val key: SpatialKey = ...  // preknown
    val layout: LayoutDefinition = ...  // preknown
    val tileExtent: Extent = layout.mapTransform(key)
    
    val tile: VectorTile = ProtobufTile.fromBytes(bytes, tileExtent)
  4. case class StrictProtobufLayer(name: String, tileWidth: Int, version: Int, tileExtent: Extent, points: Seq[Feature[Point, Map[String, Value]]], multiPoints: Seq[Feature[MultiPoint, Map[String, Value]]], lines: Seq[Feature[Line, Map[String, Value]]], multiLines: Seq[Feature[MultiLine, Map[String, Value]]], polygons: Seq[Feature[Polygon, Map[String, Value]]], multiPolygons: Seq[Feature[MultiPolygon, Map[String, Value]]]) extends ProtobufLayer with Product with Serializable

    Permalink

    A Layer crafted through some strict ingest process.

  5. case class VBool(value: Boolean) extends Value with Product with Serializable

    Permalink

    A wrapper for Boolean to allow all Value subtypes to be stored in the same Map.

  6. case class VDouble(value: Double) extends Value with Product with Serializable

    Permalink

    A wrapper for Double to allow all Value subtypes to be stored in the same Map.

  7. case class VFloat(value: Float) extends Value with Product with Serializable

    Permalink

    A wrapper for Float to allow all Value subtypes to be stored in the same Map.

  8. case class VInt64(value: Long) extends Value with Product with Serializable

    Permalink

    A wrapper for Long to allow all Value subtypes to be stored in the same Map.

  9. case class VSint64(value: Long) extends Value with Product with Serializable

    Permalink

    A wrapper for zig-zag encoded ints to allow all Value subtypes to be stored in the same Map.

  10. case class VString(value: String) extends Value with Product with Serializable

    Permalink

    A wrapper for String to allow all Value subtypes to be stored in the same Map.

  11. case class VWord64(value: Long) extends Value with Product with Serializable

    Permalink

    A wrapper for unsigned, 64-bit ints to allow all Value subtypes to be stored in the same Map.

  12. sealed trait Value extends Serializable

    Permalink

    Feature metadata key/value Maps are completely untyped.

    Feature metadata key/value Maps are completely untyped. All keys and values used by Features across a common parent Layer are stored in that parent. Raw Features themselves only store indices into the parent's key/value lists. So, for an example MultiPoint Feature of fire hydrant locations, its metadata could look like:

    { name: "Hydrants",
      colour: "red",
      model: 5
    }

    That's fine if interpreted as JSON, but bad as Scala, as it doesn't give us a clean Map[String, ConcreteTypeHere]. Furthermore, Features within the same Layer don't have to agree on the Value type for the same key:

    { name: "Stop lights",
      colour: 1,
      model: "ABC-123"
    }

    Nor, actually, do Layers have to agree on key sets for their Features. The sealed trait Value here and its extensions aim to provide some type safety in light of the situation described here.

Value Members

  1. object ProtobufTile extends Serializable

    Permalink
  2. package internal

    Permalink

Ungrouped