1option optimize_for = LITE_RUNTIME; 2 3message Data { 4 repeated string keys = 1; // global arrays of unique keys 5 6 optional uint32 dimensions = 2 [default = 2]; // max coordinate dimensions 7 optional uint32 precision = 3 [default = 6]; // number of digits after decimal point for coordinates 8 9 oneof data_type { 10 FeatureCollection feature_collection = 4; 11 Feature feature = 5; 12 Geometry geometry = 6; 13 } 14 15 message Feature { 16 required Geometry geometry = 1; 17 18 oneof id_type { 19 string id = 11; 20 sint64 int_id = 12; 21 } 22 23 repeated Value values = 13; // unique values 24 repeated uint32 properties = 14 [packed = true]; // pairs of key/value indexes 25 repeated uint32 custom_properties = 15 [packed = true]; // arbitrary properties 26 } 27 28 message Geometry { 29 required Type type = 1; 30 31 repeated uint32 lengths = 2 [packed = true]; // coordinate structure in lengths 32 repeated sint64 coords = 3 [packed = true]; // delta-encoded integer values 33 repeated Geometry geometries = 4; 34 35 repeated Value values = 13; 36 repeated uint32 custom_properties = 15 [packed = true]; 37 38 enum Type { 39 POINT = 0; 40 MULTIPOINT = 1; 41 LINESTRING = 2; 42 MULTILINESTRING = 3; 43 POLYGON = 4; 44 MULTIPOLYGON = 5; 45 GEOMETRYCOLLECTION = 6; 46 } 47 } 48 49 message FeatureCollection { 50 repeated Feature features = 1; 51 52 repeated Value values = 13; 53 repeated uint32 custom_properties = 15 [packed = true]; 54 } 55 56 message Value { 57 oneof value_type { 58 string string_value = 1; 59 double double_value = 2; 60 uint64 pos_int_value = 3; 61 uint64 neg_int_value = 4; 62 bool bool_value = 5; 63 string json_value = 6; 64 } 65 } 66} 67