summaryrefslogtreecommitdiff
path: root/proto/style.proto
blob: c8926c767c354b2af60a3ec90cf263fb01a27917 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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;
}