From 4f8556a6b80c41df8f8842a36ce13274c27b9ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 8 Jan 2014 12:10:46 +0100 Subject: add protobuf encoding of style --- proto/style.proto | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 proto/style.proto (limited to 'proto/style.proto') diff --git a/proto/style.proto b/proto/style.proto new file mode 100644 index 0000000000..cf6a8db6de --- /dev/null +++ b/proto/style.proto @@ -0,0 +1,61 @@ +enum bucket_type { + fill = 1; + line = 2; + point = 3; +} + +enum cap_type { + round = 1; +} + +enum join_type { + butt = 1; + bevel = 2; +} + +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 string source_values = 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 fontSize = 10; +} + +message structure { + required string name = 1; + optional string bucket_name = 2; + repeated structure child_layers = 3; +} + +message width { + optional string scaling = 1; + repeated float values = 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 layers = 2; +} + +// root level object +message style { + repeated bucket buckets = 1; + repeated structure structure = 2; + repeated class classes = 3; +} -- cgit v1.2.1