75 lines
1.6 KiB
Protocol Buffer
75 lines
1.6 KiB
Protocol Buffer
enum bucket_type {
|
|
fill = 1;
|
|
line = 2;
|
|
point = 3;
|
|
}
|
|
|
|
enum cap_type {
|
|
round = 1;
|
|
}
|
|
|
|
enum join_type {
|
|
butt = 1;
|
|
bevel = 2;
|
|
}
|
|
|
|
message value {
|
|
// Exactly one of these values may be present in a valid message
|
|
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 bucket {
|
|
required string name = 1;
|
|
required bucket_type type = 2;
|
|
|
|
// Specify what data to pull into this bucket
|
|
required string source_name = 3;
|
|
required string source_layer = 4;
|
|
optional string source_field = 5;
|
|
repeated value source_value = 6;
|
|
|
|
// Specifies how the geometry for this bucket should be created
|
|
optional cap_type cap = 7;
|
|
optional join_type join = 8;
|
|
optional string font = 9;
|
|
optional float font_size = 10;
|
|
}
|
|
|
|
message structure {
|
|
required string name = 1;
|
|
optional string bucket_name = 2;
|
|
repeated structure child_layer = 3;
|
|
}
|
|
|
|
message width {
|
|
optional string scaling = 1;
|
|
repeated float value = 2 [ packed = true ];
|
|
}
|
|
|
|
message layer {
|
|
required string layer_name = 1;
|
|
optional fixed32 color = 2; // rgba (=> rgb << 8 | 0xFF for opaque!)
|
|
optional bool antialias = 3;
|
|
optional width width = 4;
|
|
}
|
|
|
|
message class {
|
|
required string name = 1;
|
|
repeated layer layer = 2;
|
|
}
|
|
|
|
// root level object
|
|
message style {
|
|
repeated bucket bucket = 1;
|
|
repeated structure structure = 2;
|
|
repeated class class = 3;
|
|
}
|