-
Notifications
You must be signed in to change notification settings - Fork 84
/
geobuf.proto
66 lines (53 loc) · 1.86 KB
/
geobuf.proto
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
option optimize_for = LITE_RUNTIME;
message Data {
repeated string keys = 1; // global arrays of unique keys
optional uint32 dimensions = 2 [default = 2]; // max coordinate dimensions
optional uint32 precision = 3 [default = 6]; // number of digits after decimal point for coordinates
oneof data_type {
FeatureCollection feature_collection = 4;
Feature feature = 5;
Geometry geometry = 6;
}
message Feature {
required Geometry geometry = 1;
oneof id_type {
string id = 11;
sint64 int_id = 12;
}
repeated Value values = 13; // unique values
repeated uint32 properties = 14 [packed = true]; // pairs of key/value indexes
repeated uint32 custom_properties = 15 [packed = true]; // arbitrary properties
}
message Geometry {
required Type type = 1;
repeated uint32 lengths = 2 [packed = true]; // coordinate structure in lengths
repeated sint64 coords = 3 [packed = true]; // delta-encoded integer values
repeated Geometry geometries = 4;
repeated Value values = 13;
repeated uint32 custom_properties = 15 [packed = true];
enum Type {
POINT = 0;
MULTIPOINT = 1;
LINESTRING = 2;
MULTILINESTRING = 3;
POLYGON = 4;
MULTIPOLYGON = 5;
GEOMETRYCOLLECTION = 6;
}
}
message FeatureCollection {
repeated Feature features = 1;
repeated Value values = 13;
repeated uint32 custom_properties = 15 [packed = true];
}
message Value {
oneof value_type {
string string_value = 1;
double double_value = 2;
uint64 pos_int_value = 3;
uint64 neg_int_value = 4;
bool bool_value = 5;
string json_value = 6;
}
}
}