Skip to content

Instantly share code, notes, and snippets.

@TimMcCauley
Last active October 20, 2021 09:25
Show Gist options
  • Save TimMcCauley/491870610cc66e8180eedf40737bbaaf to your computer and use it in GitHub Desktop.
Save TimMcCauley/491870610cc66e8180eedf40737bbaaf to your computer and use it in GitHub Desktop.
package vector_tile;
option optimize_for = SPEED;
message Tile {
enum GeomType {
UNKNOWN = 0;
POINT = 1;
LINESTRING = 2;
POLYGON = 3;
}
message Value {
optional string string_value = 1;
optional float float_value = 2;
optional double double_value = 3;
optional int64 int_value = 4;
optional uint64 uint_value = 5;
optional sint64 sint_value = 6;
optional bool bool_value = 7;
extensions 8 to max;
}
message Feature {
optional uint64 id = 1 [ default = 0 ];
repeated uint32 tags = 2 [ packed = true ];
optional GeomType type = 3 [ default = UNKNOWN ];
repeated uint32 geometry = 4 [ packed = true ];
optional bytes raster = 5;
}
message Layer {
required uint32 version = 15 [ default = 1 ];
required string name = 1;
repeated Feature features = 2;
repeated string keys = 3;
repeated Value values = 4;
optional uint32 extent = 5 [ default = 4096 ];
extensions 16 to max;
}
repeated Layer layers = 3;
extensions 16 to 8191;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment