geolith 0.2.0

Shared library of the geolith builders: source readers, conflation, admin areas, tile encoding and the PMTiles and MBTiles writers
Documentation
// Mapbox Vector Tile specification v2.1
// https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto
//
// The comments on each message, enum and field below become the doc comments
// of the Rust types prost generates, so `missing_docs` holds for them too.

syntax = "proto2";

package vector_tile;

option optimize_for = LITE_RUNTIME;

// One vector tile: a list of named layers.
message Tile {
  // The geometry type of a feature (spec section 4.3.4).
  enum GeomType {
    // No or unknown geometry type.
    UNKNOWN = 0;
    // One or more points.
    POINT = 1;
    // One or more linestrings.
    LINESTRING = 2;
    // One or more polygons.
    POLYGON = 3;
  }

  // A property value. Exactly one of the fields is set.
  message Value {
    // A string value.
    optional string string_value = 1;
    // A 32-bit float value.
    optional float float_value = 2;
    // A 64-bit float value.
    optional double double_value = 3;
    // A signed integer value, varint encoded.
    optional int64 int_value = 4;
    // An unsigned integer value.
    optional uint64 uint_value = 5;
    // A signed integer value, zigzag encoded.
    optional sint64 sint_value = 6;
    // A boolean value.
    optional bool bool_value = 7;
    extensions 8 to max;
  }

  // One feature of a layer.
  message Feature {
    // The feature id, unique within its layer when set.
    optional uint64 id = 1;
    // Pairs of key and value indexes into the layer's keys and values.
    repeated uint32 tags = 2 [packed = true];
    // The geometry type.
    optional GeomType type = 3 [default = UNKNOWN];
    // The geometry as a command stream in tile coordinates (spec section 4.3).
    repeated uint32 geometry = 4 [packed = true];
  }

  // A named layer of features that share one key and value table.
  message Layer {
    // The spec version; 2 for this encoder.
    required uint32 version = 15 [default = 2];
    // The layer name, unique within the tile.
    required string name = 1;
    // The features of the layer.
    repeated Feature features = 2;
    // The property keys, deduplicated.
    repeated string keys = 3;
    // The property values, deduplicated.
    repeated Value values = 4;
    // The tile extent in tile units; 4096 by default.
    optional uint32 extent = 5 [default = 4096];
    extensions 16 to max;
  }

  // The layers of the tile.
  repeated Layer layers = 3;
  extensions 16 to 8191;
}