Skip to content

Commit

Permalink
Merge pull request #17 from mapbox/protobuf-style
Browse files Browse the repository at this point in the history
Follow protobuf style guide in proto - closes #3
  • Loading branch information
Dane Springmeyer committed Jul 28, 2014
2 parents 1d35c94 + ab5136c commit 66740c4
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions 1.0.0/vector_tile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ package mapnik.vector;

option optimize_for = LITE_RUNTIME;

message tile {
message Tile {
enum GeomType {
Unknown = 0;
Point = 1;
LineString = 2;
Polygon = 3;
UNKNOWN = 0;
POINT = 1;
LINESTRING = 2;
POLYGON = 3;
}

// Variant type encoding
message value {
message Value {
// Exactly one of these values may be present in a valid message
optional string string_value = 1;
optional float float_value = 2;
Expand All @@ -26,8 +26,8 @@ message tile {
extensions 8 to max;
}

message feature {
optional uint64 id = 1;
message Feature {
optional uint64 id = 1 [ default = 0 ];

// Tags of this feature. Even numbered values refer to the nth
// value in the keys list on the tile message, odd numbered
Expand All @@ -36,7 +36,7 @@ message tile {
repeated uint32 tags = 2 [ packed = true ];

// The type of geometry stored in this feature.
optional GeomType type = 3 [ default = Unknown ];
optional GeomType type = 3 [ default = UNKNOWN ];

// Contains a stream of commands and parameters (vertices). The
// repeat count is shifted to the left by 3 bits. This means
Expand Down Expand Up @@ -67,7 +67,7 @@ message tile {
repeated uint32 geometry = 4 [ packed = true ];
}

message layer {
message Layer {
// Any compliant implementation must first read the version
// number encoded in this message and choose the correct
// implementation for this version number before proceeding to
Expand All @@ -77,21 +77,21 @@ message tile {
required string name = 1;

// The actual features in this tile.
repeated feature features = 2;
repeated Feature features = 2;

// Dictionary encoding for keys
repeated string keys = 3;

// Dictionary encoding for values
repeated value values = 4;
repeated Value values = 4;

// The bounding box in this tile spans from 0..4095 units
optional uint32 extent = 5 [ default = 4096 ];

extensions 16 to max;
}

repeated layer layers = 3;
repeated Layer layers = 3;

extensions 16 to 8191;
}

0 comments on commit 66740c4

Please sign in to comment.