diff --git a/README b/README deleted file mode 100644 index 3b13e84..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -Kothic Mapcss parser/processor tailored for Organic Maps use. diff --git a/README.md b/README.md new file mode 100644 index 0000000..dfc5d17 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +Kothic Mapcss parser/processor tailored for Organic Maps use. + +Dependencies: +* Python >= 3.8 + +Python dependencies: +```bash +pip3 install -r requirements.txt +``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1d3ed8c --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +protobuf~=4.23.0 diff --git a/src/drules_struct_pb2.py b/src/drules_struct_pb2.py index ac627d0..a10ee5e 100644 --- a/src/drules_struct_pb2.py +++ b/src/drules_struct_pb2.py @@ -1,14 +1,11 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: indexer/drules_struct.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) -from google.protobuf.internal import enum_type_wrapper +# source: drules_struct.proto +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,1086 +13,49 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor.FileDescriptor( - name='indexer/drules_struct.proto', - package='', - syntax='proto3', - serialized_pb=_b('\n\x1bindexer/drules_struct.proto\"*\n\x0c\x44\x61shDotProto\x12\n\n\x02\x64\x64\x18\x01 \x03(\x01\x12\x0e\n\x06offset\x18\x02 \x01(\x01\":\n\x0cPathSymProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04step\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\"\xaf\x01\n\rLineRuleProto\x12\r\n\x05width\x18\x01 \x01(\x01\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x1e\n\x07\x64\x61shdot\x18\x03 \x01(\x0b\x32\r.DashDotProto\x12\x10\n\x08priority\x18\x04 \x01(\x05\x12\x1e\n\x07pathsym\x18\x05 \x01(\x0b\x32\r.PathSymProto\x12\x17\n\x04join\x18\x06 \x01(\x0e\x32\t.LineJoin\x12\x15\n\x03\x63\x61p\x18\x07 \x01(\x0e\x32\x08.LineCap\"\x9c\x01\n\x0cLineDefProto\x12\r\n\x05width\x18\x01 \x01(\x01\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x1e\n\x07\x64\x61shdot\x18\x03 \x01(\x0b\x32\r.DashDotProto\x12\x1e\n\x07pathsym\x18\x04 \x01(\x0b\x32\r.PathSymProto\x12\x17\n\x04join\x18\x06 \x01(\x0e\x32\t.LineJoin\x12\x15\n\x03\x63\x61p\x18\x07 \x01(\x0e\x32\x08.LineCap\"O\n\rAreaRuleProto\x12\r\n\x05\x63olor\x18\x01 \x01(\r\x12\x1d\n\x06\x62order\x18\x02 \x01(\x0b\x32\r.LineDefProto\x12\x10\n\x08priority\x18\x03 \x01(\x05\"_\n\x0fSymbolRuleProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0e\x61pply_for_type\x18\x02 \x01(\x05\x12\x10\n\x08priority\x18\x03 \x01(\x05\x12\x14\n\x0cmin_distance\x18\x04 \x01(\x05\"\x8d\x01\n\x0f\x43\x61ptionDefProto\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x14\n\x0cstroke_color\x18\x03 \x01(\r\x12\x10\n\x08offset_x\x18\x04 \x01(\x05\x12\x10\n\x08offset_y\x18\x05 \x01(\x05\x12\x0c\n\x04text\x18\x06 \x01(\t\x12\x13\n\x0bis_optional\x18\x07 \x01(\x08\"l\n\x10\x43\x61ptionRuleProto\x12!\n\x07primary\x18\x01 \x01(\x0b\x32\x10.CaptionDefProto\x12#\n\tsecondary\x18\x02 \x01(\x0b\x32\x10.CaptionDefProto\x12\x10\n\x08priority\x18\x03 \x01(\x05\"a\n\x0f\x43ircleRuleProto\x12\x0e\n\x06radius\x18\x01 \x01(\x01\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x1d\n\x06\x62order\x18\x03 \x01(\x0b\x32\r.LineDefProto\x12\x10\n\x08priority\x18\x04 \x01(\x05\"m\n\x11PathTextRuleProto\x12!\n\x07primary\x18\x01 \x01(\x0b\x32\x10.CaptionDefProto\x12#\n\tsecondary\x18\x02 \x01(\x0b\x32\x10.CaptionDefProto\x12\x10\n\x08priority\x18\x03 \x01(\x05\"\x9d\x01\n\x0fShieldRuleProto\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x14\n\x0cstroke_color\x18\x03 \x01(\r\x12\x10\n\x08priority\x18\x04 \x01(\x05\x12\x14\n\x0cmin_distance\x18\x05 \x01(\x05\x12\x12\n\ntext_color\x18\x06 \x01(\r\x12\x19\n\x11text_stroke_color\x18\x07 \x01(\r\"\xa1\x02\n\x10\x44rawElementProto\x12\r\n\x05scale\x18\x01 \x01(\x05\x12\x1d\n\x05lines\x18\x02 \x03(\x0b\x32\x0e.LineRuleProto\x12\x1c\n\x04\x61rea\x18\x03 \x01(\x0b\x32\x0e.AreaRuleProto\x12 \n\x06symbol\x18\x04 \x01(\x0b\x32\x10.SymbolRuleProto\x12\"\n\x07\x63\x61ption\x18\x05 \x01(\x0b\x32\x11.CaptionRuleProto\x12 \n\x06\x63ircle\x18\x06 \x01(\x0b\x32\x10.CircleRuleProto\x12%\n\tpath_text\x18\x07 \x01(\x0b\x32\x12.PathTextRuleProto\x12 \n\x06shield\x18\x08 \x01(\x0b\x32\x10.ShieldRuleProto\x12\x10\n\x08\x61pply_if\x18\t \x03(\t\"G\n\x13\x43lassifElementProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x07\x65lement\x18\x02 \x03(\x0b\x32\x11.DrawElementProto\"F\n\x11\x43olorElementProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\t\n\x01x\x18\x03 \x01(\x02\x12\t\n\x01y\x18\x04 \x01(\x02\"7\n\x12\x43olorsElementProto\x12!\n\x05value\x18\x01 \x03(\x0b\x32\x12.ColorElementProto\"Y\n\x0e\x43ontainerProto\x12\"\n\x04\x63ont\x18\x01 \x03(\x0b\x32\x14.ClassifElementProto\x12#\n\x06\x63olors\x18\x02 \x01(\x0b\x32\x13.ColorsElementProto*4\n\x08LineJoin\x12\r\n\tROUNDJOIN\x10\x00\x12\r\n\tBEVELJOIN\x10\x01\x12\n\n\x06NOJOIN\x10\x02*3\n\x07LineCap\x12\x0c\n\x08ROUNDCAP\x10\x00\x12\x0b\n\x07\x42UTTCAP\x10\x01\x12\r\n\tSQUARECAP\x10\x02\x42\x02H\x03\x62\x06proto3') -) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x64rules_struct.proto\"*\n\x0c\x44\x61shDotProto\x12\n\n\x02\x64\x64\x18\x01 \x03(\x01\x12\x0e\n\x06offset\x18\x02 \x01(\x01\":\n\x0cPathSymProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04step\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\"\xaf\x01\n\rLineRuleProto\x12\r\n\x05width\x18\x01 \x01(\x01\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x1e\n\x07\x64\x61shdot\x18\x03 \x01(\x0b\x32\r.DashDotProto\x12\x10\n\x08priority\x18\x04 \x01(\x05\x12\x1e\n\x07pathsym\x18\x05 \x01(\x0b\x32\r.PathSymProto\x12\x17\n\x04join\x18\x06 \x01(\x0e\x32\t.LineJoin\x12\x15\n\x03\x63\x61p\x18\x07 \x01(\x0e\x32\x08.LineCap\"\x9c\x01\n\x0cLineDefProto\x12\r\n\x05width\x18\x01 \x01(\x01\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x1e\n\x07\x64\x61shdot\x18\x03 \x01(\x0b\x32\r.DashDotProto\x12\x1e\n\x07pathsym\x18\x04 \x01(\x0b\x32\r.PathSymProto\x12\x17\n\x04join\x18\x06 \x01(\x0e\x32\t.LineJoin\x12\x15\n\x03\x63\x61p\x18\x07 \x01(\x0e\x32\x08.LineCap\"O\n\rAreaRuleProto\x12\r\n\x05\x63olor\x18\x01 \x01(\r\x12\x1d\n\x06\x62order\x18\x02 \x01(\x0b\x32\r.LineDefProto\x12\x10\n\x08priority\x18\x03 \x01(\x05\"_\n\x0fSymbolRuleProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x16\n\x0e\x61pply_for_type\x18\x02 \x01(\x05\x12\x10\n\x08priority\x18\x03 \x01(\x05\x12\x14\n\x0cmin_distance\x18\x04 \x01(\x05\"\x8d\x01\n\x0f\x43\x61ptionDefProto\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x14\n\x0cstroke_color\x18\x03 \x01(\r\x12\x10\n\x08offset_x\x18\x04 \x01(\x05\x12\x10\n\x08offset_y\x18\x05 \x01(\x05\x12\x0c\n\x04text\x18\x06 \x01(\t\x12\x13\n\x0bis_optional\x18\x07 \x01(\x08\"l\n\x10\x43\x61ptionRuleProto\x12!\n\x07primary\x18\x01 \x01(\x0b\x32\x10.CaptionDefProto\x12#\n\tsecondary\x18\x02 \x01(\x0b\x32\x10.CaptionDefProto\x12\x10\n\x08priority\x18\x03 \x01(\x05\"a\n\x0f\x43ircleRuleProto\x12\x0e\n\x06radius\x18\x01 \x01(\x01\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x1d\n\x06\x62order\x18\x03 \x01(\x0b\x32\r.LineDefProto\x12\x10\n\x08priority\x18\x04 \x01(\x05\"m\n\x11PathTextRuleProto\x12!\n\x07primary\x18\x01 \x01(\x0b\x32\x10.CaptionDefProto\x12#\n\tsecondary\x18\x02 \x01(\x0b\x32\x10.CaptionDefProto\x12\x10\n\x08priority\x18\x03 \x01(\x05\"\x9d\x01\n\x0fShieldRuleProto\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x14\n\x0cstroke_color\x18\x03 \x01(\r\x12\x10\n\x08priority\x18\x04 \x01(\x05\x12\x14\n\x0cmin_distance\x18\x05 \x01(\x05\x12\x12\n\ntext_color\x18\x06 \x01(\r\x12\x19\n\x11text_stroke_color\x18\x07 \x01(\r\"\xa1\x02\n\x10\x44rawElementProto\x12\r\n\x05scale\x18\x01 \x01(\x05\x12\x1d\n\x05lines\x18\x02 \x03(\x0b\x32\x0e.LineRuleProto\x12\x1c\n\x04\x61rea\x18\x03 \x01(\x0b\x32\x0e.AreaRuleProto\x12 \n\x06symbol\x18\x04 \x01(\x0b\x32\x10.SymbolRuleProto\x12\"\n\x07\x63\x61ption\x18\x05 \x01(\x0b\x32\x11.CaptionRuleProto\x12 \n\x06\x63ircle\x18\x06 \x01(\x0b\x32\x10.CircleRuleProto\x12%\n\tpath_text\x18\x07 \x01(\x0b\x32\x12.PathTextRuleProto\x12 \n\x06shield\x18\x08 \x01(\x0b\x32\x10.ShieldRuleProto\x12\x10\n\x08\x61pply_if\x18\t \x03(\t\"G\n\x13\x43lassifElementProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\"\n\x07\x65lement\x18\x02 \x03(\x0b\x32\x11.DrawElementProto\"F\n\x11\x43olorElementProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\t\n\x01x\x18\x03 \x01(\x02\x12\t\n\x01y\x18\x04 \x01(\x02\"7\n\x12\x43olorsElementProto\x12!\n\x05value\x18\x01 \x03(\x0b\x32\x12.ColorElementProto\"Y\n\x0e\x43ontainerProto\x12\"\n\x04\x63ont\x18\x01 \x03(\x0b\x32\x14.ClassifElementProto\x12#\n\x06\x63olors\x18\x02 \x01(\x0b\x32\x13.ColorsElementProto*4\n\x08LineJoin\x12\r\n\tROUNDJOIN\x10\x00\x12\r\n\tBEVELJOIN\x10\x01\x12\n\n\x06NOJOIN\x10\x02*3\n\x07LineCap\x12\x0c\n\x08ROUNDCAP\x10\x00\x12\x0b\n\x07\x42UTTCAP\x10\x01\x12\r\n\tSQUARECAP\x10\x02\x42\x02H\x03\x62\x06proto3') -_LINEJOIN = _descriptor.EnumDescriptor( - name='LineJoin', - full_name='LineJoin', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='ROUNDJOIN', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BEVELJOIN', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='NOJOIN', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1859, - serialized_end=1911, -) -_sym_db.RegisterEnumDescriptor(_LINEJOIN) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'drules_struct_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: -LineJoin = enum_type_wrapper.EnumTypeWrapper(_LINEJOIN) -_LINECAP = _descriptor.EnumDescriptor( - name='LineCap', - full_name='LineCap', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='ROUNDCAP', index=0, number=0, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='BUTTCAP', index=1, number=1, - options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='SQUARECAP', index=2, number=2, - options=None, - type=None), - ], - containing_type=None, - options=None, - serialized_start=1913, - serialized_end=1964, -) -_sym_db.RegisterEnumDescriptor(_LINECAP) - -LineCap = enum_type_wrapper.EnumTypeWrapper(_LINECAP) -ROUNDJOIN = 0 -BEVELJOIN = 1 -NOJOIN = 2 -ROUNDCAP = 0 -BUTTCAP = 1 -SQUARECAP = 2 - - - -_DASHDOTPROTO = _descriptor.Descriptor( - name='DashDotProto', - full_name='DashDotProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='dd', full_name='DashDotProto.dd', index=0, - number=1, type=1, cpp_type=5, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='offset', full_name='DashDotProto.offset', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=31, - serialized_end=73, -) - - -_PATHSYMPROTO = _descriptor.Descriptor( - name='PathSymProto', - full_name='PathSymProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='PathSymProto.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='step', full_name='PathSymProto.step', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='offset', full_name='PathSymProto.offset', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=75, - serialized_end=133, -) - - -_LINERULEPROTO = _descriptor.Descriptor( - name='LineRuleProto', - full_name='LineRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='width', full_name='LineRuleProto.width', index=0, - number=1, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='color', full_name='LineRuleProto.color', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='dashdot', full_name='LineRuleProto.dashdot', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='LineRuleProto.priority', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='pathsym', full_name='LineRuleProto.pathsym', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='join', full_name='LineRuleProto.join', index=5, - number=6, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='cap', full_name='LineRuleProto.cap', index=6, - number=7, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=136, - serialized_end=311, -) - - -_LINEDEFPROTO = _descriptor.Descriptor( - name='LineDefProto', - full_name='LineDefProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='width', full_name='LineDefProto.width', index=0, - number=1, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='color', full_name='LineDefProto.color', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='dashdot', full_name='LineDefProto.dashdot', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='pathsym', full_name='LineDefProto.pathsym', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='join', full_name='LineDefProto.join', index=4, - number=6, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='cap', full_name='LineDefProto.cap', index=5, - number=7, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=314, - serialized_end=470, -) - - -_AREARULEPROTO = _descriptor.Descriptor( - name='AreaRuleProto', - full_name='AreaRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='color', full_name='AreaRuleProto.color', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='border', full_name='AreaRuleProto.border', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='AreaRuleProto.priority', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=472, - serialized_end=551, -) - - -_SYMBOLRULEPROTO = _descriptor.Descriptor( - name='SymbolRuleProto', - full_name='SymbolRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='SymbolRuleProto.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='apply_for_type', full_name='SymbolRuleProto.apply_for_type', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='SymbolRuleProto.priority', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='min_distance', full_name='SymbolRuleProto.min_distance', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=553, - serialized_end=648, -) - - -_CAPTIONDEFPROTO = _descriptor.Descriptor( - name='CaptionDefProto', - full_name='CaptionDefProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='height', full_name='CaptionDefProto.height', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='color', full_name='CaptionDefProto.color', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='stroke_color', full_name='CaptionDefProto.stroke_color', index=2, - number=3, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='offset_x', full_name='CaptionDefProto.offset_x', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='offset_y', full_name='CaptionDefProto.offset_y', index=4, - number=5, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='text', full_name='CaptionDefProto.text', index=5, - number=6, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='is_optional', full_name='CaptionDefProto.is_optional', index=6, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=651, - serialized_end=792, -) - - -_CAPTIONRULEPROTO = _descriptor.Descriptor( - name='CaptionRuleProto', - full_name='CaptionRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='primary', full_name='CaptionRuleProto.primary', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='secondary', full_name='CaptionRuleProto.secondary', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='CaptionRuleProto.priority', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=794, - serialized_end=902, -) - - -_CIRCLERULEPROTO = _descriptor.Descriptor( - name='CircleRuleProto', - full_name='CircleRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='radius', full_name='CircleRuleProto.radius', index=0, - number=1, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='color', full_name='CircleRuleProto.color', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='border', full_name='CircleRuleProto.border', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='CircleRuleProto.priority', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=904, - serialized_end=1001, -) - - -_PATHTEXTRULEPROTO = _descriptor.Descriptor( - name='PathTextRuleProto', - full_name='PathTextRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='primary', full_name='PathTextRuleProto.primary', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='secondary', full_name='PathTextRuleProto.secondary', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='PathTextRuleProto.priority', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1003, - serialized_end=1112, -) - - -_SHIELDRULEPROTO = _descriptor.Descriptor( - name='ShieldRuleProto', - full_name='ShieldRuleProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='height', full_name='ShieldRuleProto.height', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='color', full_name='ShieldRuleProto.color', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='stroke_color', full_name='ShieldRuleProto.stroke_color', index=2, - number=3, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='priority', full_name='ShieldRuleProto.priority', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='min_distance', full_name='ShieldRuleProto.min_distance', index=4, - number=5, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='text_color', full_name='ShieldRuleProto.text_color', index=5, - number=6, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='text_stroke_color', full_name='ShieldRuleProto.text_stroke_color', index=6, - number=7, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1115, - serialized_end=1272, -) - - -_DRAWELEMENTPROTO = _descriptor.Descriptor( - name='DrawElementProto', - full_name='DrawElementProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='scale', full_name='DrawElementProto.scale', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='lines', full_name='DrawElementProto.lines', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='area', full_name='DrawElementProto.area', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='symbol', full_name='DrawElementProto.symbol', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='caption', full_name='DrawElementProto.caption', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='circle', full_name='DrawElementProto.circle', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='path_text', full_name='DrawElementProto.path_text', index=6, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='shield', full_name='DrawElementProto.shield', index=7, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='apply_if', full_name='DrawElementProto.apply_if', index=8, - number=9, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1275, - serialized_end=1564, -) - - -_CLASSIFELEMENTPROTO = _descriptor.Descriptor( - name='ClassifElementProto', - full_name='ClassifElementProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='ClassifElementProto.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='element', full_name='ClassifElementProto.element', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1566, - serialized_end=1637, -) - - -_COLORELEMENTPROTO = _descriptor.Descriptor( - name='ColorElementProto', - full_name='ColorElementProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='ColorElementProto.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='color', full_name='ColorElementProto.color', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='x', full_name='ColorElementProto.x', index=2, - number=3, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='y', full_name='ColorElementProto.y', index=3, - number=4, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1639, - serialized_end=1709, -) - - -_COLORSELEMENTPROTO = _descriptor.Descriptor( - name='ColorsElementProto', - full_name='ColorsElementProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='ColorsElementProto.value', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1711, - serialized_end=1766, -) - - -_CONTAINERPROTO = _descriptor.Descriptor( - name='ContainerProto', - full_name='ContainerProto', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='cont', full_name='ContainerProto.cont', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - _descriptor.FieldDescriptor( - name='colors', full_name='ContainerProto.colors', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1768, - serialized_end=1857, -) - -_LINERULEPROTO.fields_by_name['dashdot'].message_type = _DASHDOTPROTO -_LINERULEPROTO.fields_by_name['pathsym'].message_type = _PATHSYMPROTO -_LINERULEPROTO.fields_by_name['join'].enum_type = _LINEJOIN -_LINERULEPROTO.fields_by_name['cap'].enum_type = _LINECAP -_LINEDEFPROTO.fields_by_name['dashdot'].message_type = _DASHDOTPROTO -_LINEDEFPROTO.fields_by_name['pathsym'].message_type = _PATHSYMPROTO -_LINEDEFPROTO.fields_by_name['join'].enum_type = _LINEJOIN -_LINEDEFPROTO.fields_by_name['cap'].enum_type = _LINECAP -_AREARULEPROTO.fields_by_name['border'].message_type = _LINEDEFPROTO -_CAPTIONRULEPROTO.fields_by_name['primary'].message_type = _CAPTIONDEFPROTO -_CAPTIONRULEPROTO.fields_by_name['secondary'].message_type = _CAPTIONDEFPROTO -_CIRCLERULEPROTO.fields_by_name['border'].message_type = _LINEDEFPROTO -_PATHTEXTRULEPROTO.fields_by_name['primary'].message_type = _CAPTIONDEFPROTO -_PATHTEXTRULEPROTO.fields_by_name['secondary'].message_type = _CAPTIONDEFPROTO -_DRAWELEMENTPROTO.fields_by_name['lines'].message_type = _LINERULEPROTO -_DRAWELEMENTPROTO.fields_by_name['area'].message_type = _AREARULEPROTO -_DRAWELEMENTPROTO.fields_by_name['symbol'].message_type = _SYMBOLRULEPROTO -_DRAWELEMENTPROTO.fields_by_name['caption'].message_type = _CAPTIONRULEPROTO -_DRAWELEMENTPROTO.fields_by_name['circle'].message_type = _CIRCLERULEPROTO -_DRAWELEMENTPROTO.fields_by_name['path_text'].message_type = _PATHTEXTRULEPROTO -_DRAWELEMENTPROTO.fields_by_name['shield'].message_type = _SHIELDRULEPROTO -_CLASSIFELEMENTPROTO.fields_by_name['element'].message_type = _DRAWELEMENTPROTO -_COLORSELEMENTPROTO.fields_by_name['value'].message_type = _COLORELEMENTPROTO -_CONTAINERPROTO.fields_by_name['cont'].message_type = _CLASSIFELEMENTPROTO -_CONTAINERPROTO.fields_by_name['colors'].message_type = _COLORSELEMENTPROTO -DESCRIPTOR.message_types_by_name['DashDotProto'] = _DASHDOTPROTO -DESCRIPTOR.message_types_by_name['PathSymProto'] = _PATHSYMPROTO -DESCRIPTOR.message_types_by_name['LineRuleProto'] = _LINERULEPROTO -DESCRIPTOR.message_types_by_name['LineDefProto'] = _LINEDEFPROTO -DESCRIPTOR.message_types_by_name['AreaRuleProto'] = _AREARULEPROTO -DESCRIPTOR.message_types_by_name['SymbolRuleProto'] = _SYMBOLRULEPROTO -DESCRIPTOR.message_types_by_name['CaptionDefProto'] = _CAPTIONDEFPROTO -DESCRIPTOR.message_types_by_name['CaptionRuleProto'] = _CAPTIONRULEPROTO -DESCRIPTOR.message_types_by_name['CircleRuleProto'] = _CIRCLERULEPROTO -DESCRIPTOR.message_types_by_name['PathTextRuleProto'] = _PATHTEXTRULEPROTO -DESCRIPTOR.message_types_by_name['ShieldRuleProto'] = _SHIELDRULEPROTO -DESCRIPTOR.message_types_by_name['DrawElementProto'] = _DRAWELEMENTPROTO -DESCRIPTOR.message_types_by_name['ClassifElementProto'] = _CLASSIFELEMENTPROTO -DESCRIPTOR.message_types_by_name['ColorElementProto'] = _COLORELEMENTPROTO -DESCRIPTOR.message_types_by_name['ColorsElementProto'] = _COLORSELEMENTPROTO -DESCRIPTOR.message_types_by_name['ContainerProto'] = _CONTAINERPROTO -DESCRIPTOR.enum_types_by_name['LineJoin'] = _LINEJOIN -DESCRIPTOR.enum_types_by_name['LineCap'] = _LINECAP -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DashDotProto = _reflection.GeneratedProtocolMessageType('DashDotProto', (_message.Message,), dict( - DESCRIPTOR = _DASHDOTPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:DashDotProto) - )) -_sym_db.RegisterMessage(DashDotProto) - -PathSymProto = _reflection.GeneratedProtocolMessageType('PathSymProto', (_message.Message,), dict( - DESCRIPTOR = _PATHSYMPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:PathSymProto) - )) -_sym_db.RegisterMessage(PathSymProto) - -LineRuleProto = _reflection.GeneratedProtocolMessageType('LineRuleProto', (_message.Message,), dict( - DESCRIPTOR = _LINERULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:LineRuleProto) - )) -_sym_db.RegisterMessage(LineRuleProto) - -LineDefProto = _reflection.GeneratedProtocolMessageType('LineDefProto', (_message.Message,), dict( - DESCRIPTOR = _LINEDEFPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:LineDefProto) - )) -_sym_db.RegisterMessage(LineDefProto) - -AreaRuleProto = _reflection.GeneratedProtocolMessageType('AreaRuleProto', (_message.Message,), dict( - DESCRIPTOR = _AREARULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:AreaRuleProto) - )) -_sym_db.RegisterMessage(AreaRuleProto) - -SymbolRuleProto = _reflection.GeneratedProtocolMessageType('SymbolRuleProto', (_message.Message,), dict( - DESCRIPTOR = _SYMBOLRULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:SymbolRuleProto) - )) -_sym_db.RegisterMessage(SymbolRuleProto) - -CaptionDefProto = _reflection.GeneratedProtocolMessageType('CaptionDefProto', (_message.Message,), dict( - DESCRIPTOR = _CAPTIONDEFPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:CaptionDefProto) - )) -_sym_db.RegisterMessage(CaptionDefProto) - -CaptionRuleProto = _reflection.GeneratedProtocolMessageType('CaptionRuleProto', (_message.Message,), dict( - DESCRIPTOR = _CAPTIONRULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:CaptionRuleProto) - )) -_sym_db.RegisterMessage(CaptionRuleProto) - -CircleRuleProto = _reflection.GeneratedProtocolMessageType('CircleRuleProto', (_message.Message,), dict( - DESCRIPTOR = _CIRCLERULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:CircleRuleProto) - )) -_sym_db.RegisterMessage(CircleRuleProto) - -PathTextRuleProto = _reflection.GeneratedProtocolMessageType('PathTextRuleProto', (_message.Message,), dict( - DESCRIPTOR = _PATHTEXTRULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:PathTextRuleProto) - )) -_sym_db.RegisterMessage(PathTextRuleProto) - -ShieldRuleProto = _reflection.GeneratedProtocolMessageType('ShieldRuleProto', (_message.Message,), dict( - DESCRIPTOR = _SHIELDRULEPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:ShieldRuleProto) - )) -_sym_db.RegisterMessage(ShieldRuleProto) - -DrawElementProto = _reflection.GeneratedProtocolMessageType('DrawElementProto', (_message.Message,), dict( - DESCRIPTOR = _DRAWELEMENTPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:DrawElementProto) - )) -_sym_db.RegisterMessage(DrawElementProto) - -ClassifElementProto = _reflection.GeneratedProtocolMessageType('ClassifElementProto', (_message.Message,), dict( - DESCRIPTOR = _CLASSIFELEMENTPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:ClassifElementProto) - )) -_sym_db.RegisterMessage(ClassifElementProto) - -ColorElementProto = _reflection.GeneratedProtocolMessageType('ColorElementProto', (_message.Message,), dict( - DESCRIPTOR = _COLORELEMENTPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:ColorElementProto) - )) -_sym_db.RegisterMessage(ColorElementProto) - -ColorsElementProto = _reflection.GeneratedProtocolMessageType('ColorsElementProto', (_message.Message,), dict( - DESCRIPTOR = _COLORSELEMENTPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:ColorsElementProto) - )) -_sym_db.RegisterMessage(ColorsElementProto) - -ContainerProto = _reflection.GeneratedProtocolMessageType('ContainerProto', (_message.Message,), dict( - DESCRIPTOR = _CONTAINERPROTO, - __module__ = 'indexer.drules_struct_pb2' - # @@protoc_insertion_point(class_scope:ContainerProto) - )) -_sym_db.RegisterMessage(ContainerProto) - - -DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('H\003')) + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'H\003' + _globals['_LINEJOIN']._serialized_start=1851 + _globals['_LINEJOIN']._serialized_end=1903 + _globals['_LINECAP']._serialized_start=1905 + _globals['_LINECAP']._serialized_end=1956 + _globals['_DASHDOTPROTO']._serialized_start=23 + _globals['_DASHDOTPROTO']._serialized_end=65 + _globals['_PATHSYMPROTO']._serialized_start=67 + _globals['_PATHSYMPROTO']._serialized_end=125 + _globals['_LINERULEPROTO']._serialized_start=128 + _globals['_LINERULEPROTO']._serialized_end=303 + _globals['_LINEDEFPROTO']._serialized_start=306 + _globals['_LINEDEFPROTO']._serialized_end=462 + _globals['_AREARULEPROTO']._serialized_start=464 + _globals['_AREARULEPROTO']._serialized_end=543 + _globals['_SYMBOLRULEPROTO']._serialized_start=545 + _globals['_SYMBOLRULEPROTO']._serialized_end=640 + _globals['_CAPTIONDEFPROTO']._serialized_start=643 + _globals['_CAPTIONDEFPROTO']._serialized_end=784 + _globals['_CAPTIONRULEPROTO']._serialized_start=786 + _globals['_CAPTIONRULEPROTO']._serialized_end=894 + _globals['_CIRCLERULEPROTO']._serialized_start=896 + _globals['_CIRCLERULEPROTO']._serialized_end=993 + _globals['_PATHTEXTRULEPROTO']._serialized_start=995 + _globals['_PATHTEXTRULEPROTO']._serialized_end=1104 + _globals['_SHIELDRULEPROTO']._serialized_start=1107 + _globals['_SHIELDRULEPROTO']._serialized_end=1264 + _globals['_DRAWELEMENTPROTO']._serialized_start=1267 + _globals['_DRAWELEMENTPROTO']._serialized_end=1556 + _globals['_CLASSIFELEMENTPROTO']._serialized_start=1558 + _globals['_CLASSIFELEMENTPROTO']._serialized_end=1629 + _globals['_COLORELEMENTPROTO']._serialized_start=1631 + _globals['_COLORELEMENTPROTO']._serialized_end=1701 + _globals['_COLORSELEMENTPROTO']._serialized_start=1703 + _globals['_COLORSELEMENTPROTO']._serialized_end=1758 + _globals['_CONTAINERPROTO']._serialized_start=1760 + _globals['_CONTAINERPROTO']._serialized_end=1849 # @@protoc_insertion_point(module_scope) diff --git a/src/libkomwm.py b/src/libkomwm.py index 0af8d99..d8d756a 100644 --- a/src/libkomwm.py +++ b/src/libkomwm.py @@ -2,11 +2,11 @@ from mapcss import MapCSS from optparse import OptionParser import os import csv -import sys import functools from multiprocessing import Pool, set_start_method from collections import OrderedDict import mapcss.webcolors +from drules_struct_pb2 import * whatever_to_hex = mapcss.webcolors.webcolors.whatever_to_hex whatever_to_cairo = mapcss.webcolors.webcolors.whatever_to_cairo @@ -14,17 +14,6 @@ whatever_to_cairo = mapcss.webcolors.webcolors.whatever_to_cairo PROFILE = False MULTIPROCESSING = True -# If path to the protobuf EGG is specified then apply it before import drules_struct_pb2 -PROTOBUF_EGG_PATH = os.environ.get("PROTOBUF_EGG_PATH") -if PROTOBUF_EGG_PATH: - # another version of protobuf may be installed, override it - for i in range(len(sys.path)): - if -1 != sys.path[i].find("protobuf-"): - sys.path[i] = PROTOBUF_EGG_PATH - sys.path.append(PROTOBUF_EGG_PATH) - -from drules_struct_pb2 import * - WIDTH_SCALE = 1.0 # z-index values defined in mapcss files are first