diff --git a/enstools/feature/identification/_proto_gen/identification_pb2.py b/enstools/feature/identification/_proto_gen/identification_pb2.py index 8a17aec1deef1af6fdcac0dd69ebcdee82d7dc36..66c742d124b29282c56d0987847d4cd9a341a0fb 100644 --- a/enstools/feature/identification/_proto_gen/identification_pb2.py +++ b/enstools/feature/identification/_proto_gen/identification_pb2.py @@ -1,13 +1,12 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: identification.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -15,622 +14,131 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor.FileDescriptor( - name='identification.proto', - package='', - syntax='proto2', - serialized_pb=_b('\n\x14identification.proto\"\x16\n\nProperties*\x08\x08\x64\x10\x80\x80\x80\x80\x02\")\n\tVoxelData\x12\r\n\x05index\x18\x01 \x03(\r\x12\r\n\x05value\x18\x02 \x01(\x02\"-\n\nVertexData\x12\x10\n\x08position\x18\x01 \x03(\x02\x12\r\n\x05value\x18\x02 \x01(\x02\"+\n\x08\x46\x61\x63\x65\x44\x61ta\x12\x10\n\x08vertices\x18\x01 \x03(\r\x12\r\n\x05value\x18\x02 \x01(\x02\"C\n\x13VoxelRepresentation\x12\x0c\n\x04\x64\x65sc\x18\x01 \x01(\t\x12\x1e\n\nvoxel_data\x18\x02 \x03(\x0b\x32\n.VoxelData\"D\n\x12LineRepresentation\x12\x0c\n\x04\x64\x65sc\x18\x01 \x01(\t\x12 \n\x0bvertex_data\x18\x02 \x03(\x0b\x32\x0b.VertexData\"f\n\x16\x42oundaryRepresentation\x12\x0c\n\x04\x64\x65sc\x18\x01 \x01(\t\x12 \n\x0bvertex_data\x18\x02 \x03(\x0b\x32\x0b.VertexData\x12\x1c\n\tface_data\x18\x03 \x03(\x0b\x32\t.FaceData\"(\n\nConnection\x12\x0c\n\x04id_1\x18\x01 \x02(\x05\x12\x0c\n\x04id_2\x18\x02 \x02(\x05\"\xb4\x01\n\x06Object\x12\n\n\x02id\x18\x01 \x02(\x05\x12%\n\x08line_rep\x18\x02 \x03(\x0b\x32\x13.LineRepresentation\x12\'\n\tvoxel_rep\x18\x03 \x01(\x0b\x32\x14.VoxelRepresentation\x12-\n\x0c\x62oundary_rep\x18\x04 \x03(\x0b\x32\x17.BoundaryRepresentation\x12\x1f\n\nproperties\x18\x05 \x01(\x0b\x32\x0b.Properties\"8\n\x08Timeline\x12\x12\n\nvalid_time\x18\x01 \x02(\t\x12\x18\n\x07objects\x18\x02 \x03(\x0b\x32\x07.Object\"p\n\x0cTrackableSet\x12\x11\n\tinit_time\x18\x01 \x01(\t\x12\x0e\n\x06member\x18\x02 \x01(\x02\x12\x1b\n\x08timeline\x18\x03 \x03(\x0b\x32\t.Timeline\x12 \n\x0b\x63onnections\x18\x04 \x03(\x0b\x32\x0b.Connection\"_\n\x12\x44\x61tasetDescription\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x0c\n\x04\x66ile\x18\x02 \x02(\t\x12\x10\n\x08run_time\x18\x03 \x02(\t\x12\x1b\n\x04sets\x18\x04 \x03(\x0b\x32\r.TrackableSet') -) - - - - -_PROPERTIES = _descriptor.Descriptor( - name='Properties', - full_name='Properties', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=True, - syntax='proto2', - extension_ranges=[(100, 536870912), ], - oneofs=[ - ], - serialized_start=24, - serialized_end=46, -) - - -_VOXELDATA = _descriptor.Descriptor( - name='VoxelData', - full_name='VoxelData', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='index', full_name='VoxelData.index', index=0, - number=1, type=13, cpp_type=3, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='VoxelData.value', index=1, - number=2, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=48, - serialized_end=89, -) - - -_VERTEXDATA = _descriptor.Descriptor( - name='VertexData', - full_name='VertexData', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='position', full_name='VertexData.position', index=0, - number=1, type=2, cpp_type=6, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='VertexData.value', index=1, - number=2, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=91, - serialized_end=136, -) - - -_FACEDATA = _descriptor.Descriptor( - name='FaceData', - full_name='FaceData', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='vertices', full_name='FaceData.vertices', index=0, - number=1, type=13, cpp_type=3, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='FaceData.value', index=1, - number=2, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=138, - serialized_end=181, -) - - -_VOXELREPRESENTATION = _descriptor.Descriptor( - name='VoxelRepresentation', - full_name='VoxelRepresentation', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='desc', full_name='VoxelRepresentation.desc', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='voxel_data', full_name='VoxelRepresentation.voxel_data', 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=183, - serialized_end=250, -) - +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14identification.proto\"\x16\n\nProperties*\x08\x08\x64\x10\x80\x80\x80\x80\x02\")\n\tVoxelData\x12\r\n\x05index\x18\x01 \x03(\r\x12\r\n\x05value\x18\x02 \x01(\x02\"-\n\nVertexData\x12\x10\n\x08position\x18\x01 \x03(\x02\x12\r\n\x05value\x18\x02 \x01(\x02\"+\n\x08\x46\x61\x63\x65\x44\x61ta\x12\x10\n\x08vertices\x18\x01 \x03(\r\x12\r\n\x05value\x18\x02 \x01(\x02\"C\n\x13VoxelRepresentation\x12\x0c\n\x04\x64\x65sc\x18\x01 \x01(\t\x12\x1e\n\nvoxel_data\x18\x02 \x03(\x0b\x32\n.VoxelData\"D\n\x12LineRepresentation\x12\x0c\n\x04\x64\x65sc\x18\x01 \x01(\t\x12 \n\x0bvertex_data\x18\x02 \x03(\x0b\x32\x0b.VertexData\"f\n\x16\x42oundaryRepresentation\x12\x0c\n\x04\x64\x65sc\x18\x01 \x01(\t\x12 \n\x0bvertex_data\x18\x02 \x03(\x0b\x32\x0b.VertexData\x12\x1c\n\tface_data\x18\x03 \x03(\x0b\x32\t.FaceData\"(\n\nConnection\x12\x0c\n\x04id_1\x18\x01 \x02(\x05\x12\x0c\n\x04id_2\x18\x02 \x02(\x05\"\xb4\x01\n\x06Object\x12\n\n\x02id\x18\x01 \x02(\x05\x12%\n\x08line_rep\x18\x02 \x03(\x0b\x32\x13.LineRepresentation\x12\'\n\tvoxel_rep\x18\x03 \x01(\x0b\x32\x14.VoxelRepresentation\x12-\n\x0c\x62oundary_rep\x18\x04 \x03(\x0b\x32\x17.BoundaryRepresentation\x12\x1f\n\nproperties\x18\x05 \x01(\x0b\x32\x0b.Properties\"8\n\x08Timeline\x12\x12\n\nvalid_time\x18\x01 \x02(\t\x12\x18\n\x07objects\x18\x02 \x03(\x0b\x32\x07.Object\"p\n\x0cTrackableSet\x12\x11\n\tinit_time\x18\x01 \x01(\t\x12\x0e\n\x06member\x18\x02 \x01(\x02\x12\x1b\n\x08timeline\x18\x03 \x03(\x0b\x32\t.Timeline\x12 \n\x0b\x63onnections\x18\x04 \x03(\x0b\x32\x0b.Connection\"_\n\x12\x44\x61tasetDescription\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x0c\n\x04\x66ile\x18\x02 \x02(\t\x12\x10\n\x08run_time\x18\x03 \x02(\t\x12\x1b\n\x04sets\x18\x04 \x03(\x0b\x32\r.TrackableSet') -_LINEREPRESENTATION = _descriptor.Descriptor( - name='LineRepresentation', - full_name='LineRepresentation', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='desc', full_name='LineRepresentation.desc', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='vertex_data', full_name='LineRepresentation.vertex_data', 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=252, - serialized_end=320, -) -_BOUNDARYREPRESENTATION = _descriptor.Descriptor( - name='BoundaryRepresentation', - full_name='BoundaryRepresentation', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='desc', full_name='BoundaryRepresentation.desc', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='vertex_data', full_name='BoundaryRepresentation.vertex_data', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='face_data', full_name='BoundaryRepresentation.face_data', index=2, - number=3, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=322, - serialized_end=424, -) - - -_CONNECTION = _descriptor.Descriptor( - name='Connection', - full_name='Connection', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id_1', full_name='Connection.id_1', index=0, - number=1, type=5, cpp_type=1, label=2, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='id_2', full_name='Connection.id_2', index=1, - number=2, type=5, cpp_type=1, label=2, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=426, - serialized_end=466, -) - - -_OBJECT = _descriptor.Descriptor( - name='Object', - full_name='Object', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='Object.id', index=0, - number=1, type=5, cpp_type=1, label=2, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='line_rep', full_name='Object.line_rep', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='voxel_rep', full_name='Object.voxel_rep', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='boundary_rep', full_name='Object.boundary_rep', index=3, - number=4, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='properties', full_name='Object.properties', 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=469, - serialized_end=649, -) - - -_TIMELINE = _descriptor.Descriptor( - name='Timeline', - full_name='Timeline', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='valid_time', full_name='Timeline.valid_time', index=0, - number=1, type=9, cpp_type=9, label=2, - 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='objects', full_name='Timeline.objects', 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=651, - serialized_end=707, -) - - -_TRACKABLESET = _descriptor.Descriptor( - name='TrackableSet', - full_name='TrackableSet', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='init_time', full_name='TrackableSet.init_time', 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='member', full_name='TrackableSet.member', index=1, - number=2, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='timeline', full_name='TrackableSet.timeline', index=2, - number=3, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='connections', full_name='TrackableSet.connections', index=3, - number=4, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=709, - serialized_end=821, -) - - -_DATASETDESCRIPTION = _descriptor.Descriptor( - name='DatasetDescription', - full_name='DatasetDescription', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='DatasetDescription.name', index=0, - number=1, type=9, cpp_type=9, label=2, - 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='file', full_name='DatasetDescription.file', index=1, - number=2, type=9, cpp_type=9, label=2, - 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='run_time', full_name='DatasetDescription.run_time', index=2, - number=3, type=9, cpp_type=9, label=2, - 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sets', full_name='DatasetDescription.sets', index=3, - number=4, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=823, - serialized_end=918, -) - -_VOXELREPRESENTATION.fields_by_name['voxel_data'].message_type = _VOXELDATA -_LINEREPRESENTATION.fields_by_name['vertex_data'].message_type = _VERTEXDATA -_BOUNDARYREPRESENTATION.fields_by_name['vertex_data'].message_type = _VERTEXDATA -_BOUNDARYREPRESENTATION.fields_by_name['face_data'].message_type = _FACEDATA -_OBJECT.fields_by_name['line_rep'].message_type = _LINEREPRESENTATION -_OBJECT.fields_by_name['voxel_rep'].message_type = _VOXELREPRESENTATION -_OBJECT.fields_by_name['boundary_rep'].message_type = _BOUNDARYREPRESENTATION -_OBJECT.fields_by_name['properties'].message_type = _PROPERTIES -_TIMELINE.fields_by_name['objects'].message_type = _OBJECT -_TRACKABLESET.fields_by_name['timeline'].message_type = _TIMELINE -_TRACKABLESET.fields_by_name['connections'].message_type = _CONNECTION -_DATASETDESCRIPTION.fields_by_name['sets'].message_type = _TRACKABLESET -DESCRIPTOR.message_types_by_name['Properties'] = _PROPERTIES -DESCRIPTOR.message_types_by_name['VoxelData'] = _VOXELDATA -DESCRIPTOR.message_types_by_name['VertexData'] = _VERTEXDATA -DESCRIPTOR.message_types_by_name['FaceData'] = _FACEDATA -DESCRIPTOR.message_types_by_name['VoxelRepresentation'] = _VOXELREPRESENTATION -DESCRIPTOR.message_types_by_name['LineRepresentation'] = _LINEREPRESENTATION -DESCRIPTOR.message_types_by_name['BoundaryRepresentation'] = _BOUNDARYREPRESENTATION -DESCRIPTOR.message_types_by_name['Connection'] = _CONNECTION -DESCRIPTOR.message_types_by_name['Object'] = _OBJECT -DESCRIPTOR.message_types_by_name['Timeline'] = _TIMELINE -DESCRIPTOR.message_types_by_name['TrackableSet'] = _TRACKABLESET -DESCRIPTOR.message_types_by_name['DatasetDescription'] = _DATASETDESCRIPTION -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -Properties = _reflection.GeneratedProtocolMessageType('Properties', (_message.Message,), dict( - DESCRIPTOR = _PROPERTIES, - __module__ = 'identification_pb2' +_PROPERTIES = DESCRIPTOR.message_types_by_name['Properties'] +_VOXELDATA = DESCRIPTOR.message_types_by_name['VoxelData'] +_VERTEXDATA = DESCRIPTOR.message_types_by_name['VertexData'] +_FACEDATA = DESCRIPTOR.message_types_by_name['FaceData'] +_VOXELREPRESENTATION = DESCRIPTOR.message_types_by_name['VoxelRepresentation'] +_LINEREPRESENTATION = DESCRIPTOR.message_types_by_name['LineRepresentation'] +_BOUNDARYREPRESENTATION = DESCRIPTOR.message_types_by_name['BoundaryRepresentation'] +_CONNECTION = DESCRIPTOR.message_types_by_name['Connection'] +_OBJECT = DESCRIPTOR.message_types_by_name['Object'] +_TIMELINE = DESCRIPTOR.message_types_by_name['Timeline'] +_TRACKABLESET = DESCRIPTOR.message_types_by_name['TrackableSet'] +_DATASETDESCRIPTION = DESCRIPTOR.message_types_by_name['DatasetDescription'] +Properties = _reflection.GeneratedProtocolMessageType('Properties', (_message.Message,), { + 'DESCRIPTOR' : _PROPERTIES, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:Properties) - )) + }) _sym_db.RegisterMessage(Properties) -VoxelData = _reflection.GeneratedProtocolMessageType('VoxelData', (_message.Message,), dict( - DESCRIPTOR = _VOXELDATA, - __module__ = 'identification_pb2' +VoxelData = _reflection.GeneratedProtocolMessageType('VoxelData', (_message.Message,), { + 'DESCRIPTOR' : _VOXELDATA, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:VoxelData) - )) + }) _sym_db.RegisterMessage(VoxelData) -VertexData = _reflection.GeneratedProtocolMessageType('VertexData', (_message.Message,), dict( - DESCRIPTOR = _VERTEXDATA, - __module__ = 'identification_pb2' +VertexData = _reflection.GeneratedProtocolMessageType('VertexData', (_message.Message,), { + 'DESCRIPTOR' : _VERTEXDATA, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:VertexData) - )) + }) _sym_db.RegisterMessage(VertexData) -FaceData = _reflection.GeneratedProtocolMessageType('FaceData', (_message.Message,), dict( - DESCRIPTOR = _FACEDATA, - __module__ = 'identification_pb2' +FaceData = _reflection.GeneratedProtocolMessageType('FaceData', (_message.Message,), { + 'DESCRIPTOR' : _FACEDATA, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:FaceData) - )) + }) _sym_db.RegisterMessage(FaceData) -VoxelRepresentation = _reflection.GeneratedProtocolMessageType('VoxelRepresentation', (_message.Message,), dict( - DESCRIPTOR = _VOXELREPRESENTATION, - __module__ = 'identification_pb2' +VoxelRepresentation = _reflection.GeneratedProtocolMessageType('VoxelRepresentation', (_message.Message,), { + 'DESCRIPTOR' : _VOXELREPRESENTATION, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:VoxelRepresentation) - )) + }) _sym_db.RegisterMessage(VoxelRepresentation) -LineRepresentation = _reflection.GeneratedProtocolMessageType('LineRepresentation', (_message.Message,), dict( - DESCRIPTOR = _LINEREPRESENTATION, - __module__ = 'identification_pb2' +LineRepresentation = _reflection.GeneratedProtocolMessageType('LineRepresentation', (_message.Message,), { + 'DESCRIPTOR' : _LINEREPRESENTATION, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:LineRepresentation) - )) + }) _sym_db.RegisterMessage(LineRepresentation) -BoundaryRepresentation = _reflection.GeneratedProtocolMessageType('BoundaryRepresentation', (_message.Message,), dict( - DESCRIPTOR = _BOUNDARYREPRESENTATION, - __module__ = 'identification_pb2' +BoundaryRepresentation = _reflection.GeneratedProtocolMessageType('BoundaryRepresentation', (_message.Message,), { + 'DESCRIPTOR' : _BOUNDARYREPRESENTATION, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:BoundaryRepresentation) - )) + }) _sym_db.RegisterMessage(BoundaryRepresentation) -Connection = _reflection.GeneratedProtocolMessageType('Connection', (_message.Message,), dict( - DESCRIPTOR = _CONNECTION, - __module__ = 'identification_pb2' +Connection = _reflection.GeneratedProtocolMessageType('Connection', (_message.Message,), { + 'DESCRIPTOR' : _CONNECTION, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:Connection) - )) + }) _sym_db.RegisterMessage(Connection) -Object = _reflection.GeneratedProtocolMessageType('Object', (_message.Message,), dict( - DESCRIPTOR = _OBJECT, - __module__ = 'identification_pb2' +Object = _reflection.GeneratedProtocolMessageType('Object', (_message.Message,), { + 'DESCRIPTOR' : _OBJECT, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:Object) - )) + }) _sym_db.RegisterMessage(Object) -Timeline = _reflection.GeneratedProtocolMessageType('Timeline', (_message.Message,), dict( - DESCRIPTOR = _TIMELINE, - __module__ = 'identification_pb2' +Timeline = _reflection.GeneratedProtocolMessageType('Timeline', (_message.Message,), { + 'DESCRIPTOR' : _TIMELINE, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:Timeline) - )) + }) _sym_db.RegisterMessage(Timeline) -TrackableSet = _reflection.GeneratedProtocolMessageType('TrackableSet', (_message.Message,), dict( - DESCRIPTOR = _TRACKABLESET, - __module__ = 'identification_pb2' +TrackableSet = _reflection.GeneratedProtocolMessageType('TrackableSet', (_message.Message,), { + 'DESCRIPTOR' : _TRACKABLESET, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:TrackableSet) - )) + }) _sym_db.RegisterMessage(TrackableSet) -DatasetDescription = _reflection.GeneratedProtocolMessageType('DatasetDescription', (_message.Message,), dict( - DESCRIPTOR = _DATASETDESCRIPTION, - __module__ = 'identification_pb2' +DatasetDescription = _reflection.GeneratedProtocolMessageType('DatasetDescription', (_message.Message,), { + 'DESCRIPTOR' : _DATASETDESCRIPTION, + '__module__' : 'identification_pb2' # @@protoc_insertion_point(class_scope:DatasetDescription) - )) + }) _sym_db.RegisterMessage(DatasetDescription) - +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + _PROPERTIES._serialized_start=24 + _PROPERTIES._serialized_end=46 + _VOXELDATA._serialized_start=48 + _VOXELDATA._serialized_end=89 + _VERTEXDATA._serialized_start=91 + _VERTEXDATA._serialized_end=136 + _FACEDATA._serialized_start=138 + _FACEDATA._serialized_end=181 + _VOXELREPRESENTATION._serialized_start=183 + _VOXELREPRESENTATION._serialized_end=250 + _LINEREPRESENTATION._serialized_start=252 + _LINEREPRESENTATION._serialized_end=320 + _BOUNDARYREPRESENTATION._serialized_start=322 + _BOUNDARYREPRESENTATION._serialized_end=424 + _CONNECTION._serialized_start=426 + _CONNECTION._serialized_end=466 + _OBJECT._serialized_start=469 + _OBJECT._serialized_end=649 + _TIMELINE._serialized_start=651 + _TIMELINE._serialized_end=707 + _TRACKABLESET._serialized_start=709 + _TRACKABLESET._serialized_end=821 + _DATASETDESCRIPTION._serialized_start=823 + _DATASETDESCRIPTION._serialized_end=918 # @@protoc_insertion_point(module_scope) diff --git a/enstools/feature/identification/_proto_gen/pv_streamer_pb2.py b/enstools/feature/identification/_proto_gen/pv_streamer_pb2.py index 28fd5ec6f19e4980f3a90f96f2aaffe5be4be44e..80853967ae57b5565334874049fbc847fbc111a9 100644 --- a/enstools/feature/identification/_proto_gen/pv_streamer_pb2.py +++ b/enstools/feature/identification/_proto_gen/pv_streamer_pb2.py @@ -1,13 +1,12 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pv_streamer.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,279 +15,76 @@ _sym_db = _symbol_database.Default() import identification_pb2 as identification__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='pv_streamer.proto', - package='', - syntax='proto2', - serialized_pb=_b('\n\x11pv_streamer.proto\x1a\x14identification.proto\"4\n\tVectorGeo\x12\r\n\x05level\x18\x64 \x01(\x02\x12\x0b\n\x03lat\x18\x65 \x01(\x02\x12\x0b\n\x03lon\x18\x66 \x01(\x02\")\n\x06Vector\x12\t\n\x01z\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01x\x18\x03 \x01(\x02:)\n\x08\x63\x65ntroid\x12\x0b.Properties\x18\x64 \x01(\x0b\x32\n.VectorGeo:\x1f\n\nvolume_km3\x12\x0b.Properties\x18\x65 \x01(\x02: \n\x0bvolume_km2K\x12\x0b.Properties\x18\x66 \x01(\x02:\x1d\n\x08\x61rea_km2\x12\x0b.Properties\x18g \x01(\x02:)\n\x08min_bbox\x12\x0b.Properties\x18h \x01(\x0b\x32\n.VectorGeo:)\n\x08max_bbox\x12\x0b.Properties\x18i \x01(\x0b\x32\n.VectorGeo:\x1b\n\x06max_pv\x12\x0b.Properties\x18j \x01(\x02:\x1b\n\x06\x61vg_pv\x12\x0b.Properties\x18k \x01(\x02:\x1e\n\tis_cutoff\x12\x0b.Properties\x18l \x01(\x08:\x1b\n\x06length\x12\x0b.Properties\x18m \x01(\x02:!\n\x0clength_ratio\x12\x0b.Properties\x18n \x01(\x02:(\n\nmajor_axis\x12\x0b.Properties\x18o \x01(\x0b\x32\x07.Vector:)\n\x0bmedium_axis\x12\x0b.Properties\x18p \x01(\x0b\x32\x07.Vector:(\n\nminor_axis\x12\x0b.Properties\x18q \x01(\x0b\x32\x07.Vector:/\n\x1amajor_axis_orientation_deg\x12\x0b.Properties\x18r \x01(\x02') - , - dependencies=[identification__pb2.DESCRIPTOR,]) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11pv_streamer.proto\x1a\x14identification.proto\"4\n\tVectorGeo\x12\r\n\x05level\x18\x64 \x01(\x02\x12\x0b\n\x03lat\x18\x65 \x01(\x02\x12\x0b\n\x03lon\x18\x66 \x01(\x02\")\n\x06Vector\x12\t\n\x01z\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01x\x18\x03 \x01(\x02:)\n\x08\x63\x65ntroid\x12\x0b.Properties\x18\x64 \x01(\x0b\x32\n.VectorGeo:\x1f\n\nvolume_km3\x12\x0b.Properties\x18\x65 \x01(\x02: \n\x0bvolume_km2K\x12\x0b.Properties\x18\x66 \x01(\x02:\x1d\n\x08\x61rea_km2\x12\x0b.Properties\x18g \x01(\x02:)\n\x08min_bbox\x12\x0b.Properties\x18h \x01(\x0b\x32\n.VectorGeo:)\n\x08max_bbox\x12\x0b.Properties\x18i \x01(\x0b\x32\n.VectorGeo:\x1b\n\x06max_pv\x12\x0b.Properties\x18j \x01(\x02:\x1b\n\x06\x61vg_pv\x12\x0b.Properties\x18k \x01(\x02:\x1e\n\tis_cutoff\x12\x0b.Properties\x18l \x01(\x08:\x1b\n\x06length\x12\x0b.Properties\x18m \x01(\x02:!\n\x0clength_ratio\x12\x0b.Properties\x18n \x01(\x02:(\n\nmajor_axis\x12\x0b.Properties\x18o \x01(\x0b\x32\x07.Vector:)\n\x0bmedium_axis\x12\x0b.Properties\x18p \x01(\x0b\x32\x07.Vector:(\n\nminor_axis\x12\x0b.Properties\x18q \x01(\x0b\x32\x07.Vector:/\n\x1amajor_axis_orientation_deg\x12\x0b.Properties\x18r \x01(\x02') CENTROID_FIELD_NUMBER = 100 -centroid = _descriptor.FieldDescriptor( - name='centroid', full_name='centroid', index=0, - number=100, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +centroid = DESCRIPTOR.extensions_by_name['centroid'] VOLUME_KM3_FIELD_NUMBER = 101 -volume_km3 = _descriptor.FieldDescriptor( - name='volume_km3', full_name='volume_km3', index=1, - number=101, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +volume_km3 = DESCRIPTOR.extensions_by_name['volume_km3'] VOLUME_KM2K_FIELD_NUMBER = 102 -volume_km2K = _descriptor.FieldDescriptor( - name='volume_km2K', full_name='volume_km2K', index=2, - number=102, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +volume_km2K = DESCRIPTOR.extensions_by_name['volume_km2K'] AREA_KM2_FIELD_NUMBER = 103 -area_km2 = _descriptor.FieldDescriptor( - name='area_km2', full_name='area_km2', index=3, - number=103, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +area_km2 = DESCRIPTOR.extensions_by_name['area_km2'] MIN_BBOX_FIELD_NUMBER = 104 -min_bbox = _descriptor.FieldDescriptor( - name='min_bbox', full_name='min_bbox', index=4, - number=104, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +min_bbox = DESCRIPTOR.extensions_by_name['min_bbox'] MAX_BBOX_FIELD_NUMBER = 105 -max_bbox = _descriptor.FieldDescriptor( - name='max_bbox', full_name='max_bbox', index=5, - number=105, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +max_bbox = DESCRIPTOR.extensions_by_name['max_bbox'] MAX_PV_FIELD_NUMBER = 106 -max_pv = _descriptor.FieldDescriptor( - name='max_pv', full_name='max_pv', index=6, - number=106, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +max_pv = DESCRIPTOR.extensions_by_name['max_pv'] AVG_PV_FIELD_NUMBER = 107 -avg_pv = _descriptor.FieldDescriptor( - name='avg_pv', full_name='avg_pv', index=7, - number=107, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +avg_pv = DESCRIPTOR.extensions_by_name['avg_pv'] IS_CUTOFF_FIELD_NUMBER = 108 -is_cutoff = _descriptor.FieldDescriptor( - name='is_cutoff', full_name='is_cutoff', index=8, - number=108, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +is_cutoff = DESCRIPTOR.extensions_by_name['is_cutoff'] LENGTH_FIELD_NUMBER = 109 -length = _descriptor.FieldDescriptor( - name='length', full_name='length', index=9, - number=109, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +length = DESCRIPTOR.extensions_by_name['length'] LENGTH_RATIO_FIELD_NUMBER = 110 -length_ratio = _descriptor.FieldDescriptor( - name='length_ratio', full_name='length_ratio', index=10, - number=110, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +length_ratio = DESCRIPTOR.extensions_by_name['length_ratio'] MAJOR_AXIS_FIELD_NUMBER = 111 -major_axis = _descriptor.FieldDescriptor( - name='major_axis', full_name='major_axis', index=11, - number=111, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +major_axis = DESCRIPTOR.extensions_by_name['major_axis'] MEDIUM_AXIS_FIELD_NUMBER = 112 -medium_axis = _descriptor.FieldDescriptor( - name='medium_axis', full_name='medium_axis', index=12, - number=112, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +medium_axis = DESCRIPTOR.extensions_by_name['medium_axis'] MINOR_AXIS_FIELD_NUMBER = 113 -minor_axis = _descriptor.FieldDescriptor( - name='minor_axis', full_name='minor_axis', index=13, - number=113, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +minor_axis = DESCRIPTOR.extensions_by_name['minor_axis'] MAJOR_AXIS_ORIENTATION_DEG_FIELD_NUMBER = 114 -major_axis_orientation_deg = _descriptor.FieldDescriptor( - name='major_axis_orientation_deg', full_name='major_axis_orientation_deg', index=14, - number=114, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) - - -_VECTORGEO = _descriptor.Descriptor( - name='VectorGeo', - full_name='VectorGeo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='level', full_name='VectorGeo.level', index=0, - number=100, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='lat', full_name='VectorGeo.lat', index=1, - number=101, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='lon', full_name='VectorGeo.lon', index=2, - number=102, 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=43, - serialized_end=95, -) - +major_axis_orientation_deg = DESCRIPTOR.extensions_by_name['major_axis_orientation_deg'] -_VECTOR = _descriptor.Descriptor( - name='Vector', - full_name='Vector', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='z', full_name='Vector.z', index=0, - number=1, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='y', full_name='Vector.y', index=1, - number=2, 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='x', full_name='Vector.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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=97, - serialized_end=138, -) - -DESCRIPTOR.message_types_by_name['VectorGeo'] = _VECTORGEO -DESCRIPTOR.message_types_by_name['Vector'] = _VECTOR -DESCRIPTOR.extensions_by_name['centroid'] = centroid -DESCRIPTOR.extensions_by_name['volume_km3'] = volume_km3 -DESCRIPTOR.extensions_by_name['volume_km2K'] = volume_km2K -DESCRIPTOR.extensions_by_name['area_km2'] = area_km2 -DESCRIPTOR.extensions_by_name['min_bbox'] = min_bbox -DESCRIPTOR.extensions_by_name['max_bbox'] = max_bbox -DESCRIPTOR.extensions_by_name['max_pv'] = max_pv -DESCRIPTOR.extensions_by_name['avg_pv'] = avg_pv -DESCRIPTOR.extensions_by_name['is_cutoff'] = is_cutoff -DESCRIPTOR.extensions_by_name['length'] = length -DESCRIPTOR.extensions_by_name['length_ratio'] = length_ratio -DESCRIPTOR.extensions_by_name['major_axis'] = major_axis -DESCRIPTOR.extensions_by_name['medium_axis'] = medium_axis -DESCRIPTOR.extensions_by_name['minor_axis'] = minor_axis -DESCRIPTOR.extensions_by_name['major_axis_orientation_deg'] = major_axis_orientation_deg -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -VectorGeo = _reflection.GeneratedProtocolMessageType('VectorGeo', (_message.Message,), dict( - DESCRIPTOR = _VECTORGEO, - __module__ = 'pv_streamer_pb2' +_VECTORGEO = DESCRIPTOR.message_types_by_name['VectorGeo'] +_VECTOR = DESCRIPTOR.message_types_by_name['Vector'] +VectorGeo = _reflection.GeneratedProtocolMessageType('VectorGeo', (_message.Message,), { + 'DESCRIPTOR' : _VECTORGEO, + '__module__' : 'pv_streamer_pb2' # @@protoc_insertion_point(class_scope:VectorGeo) - )) + }) _sym_db.RegisterMessage(VectorGeo) -Vector = _reflection.GeneratedProtocolMessageType('Vector', (_message.Message,), dict( - DESCRIPTOR = _VECTOR, - __module__ = 'pv_streamer_pb2' +Vector = _reflection.GeneratedProtocolMessageType('Vector', (_message.Message,), { + 'DESCRIPTOR' : _VECTOR, + '__module__' : 'pv_streamer_pb2' # @@protoc_insertion_point(class_scope:Vector) - )) + }) _sym_db.RegisterMessage(Vector) -centroid.message_type = _VECTORGEO -identification__pb2.Properties.RegisterExtension(centroid) -identification__pb2.Properties.RegisterExtension(volume_km3) -identification__pb2.Properties.RegisterExtension(volume_km2K) -identification__pb2.Properties.RegisterExtension(area_km2) -min_bbox.message_type = _VECTORGEO -identification__pb2.Properties.RegisterExtension(min_bbox) -max_bbox.message_type = _VECTORGEO -identification__pb2.Properties.RegisterExtension(max_bbox) -identification__pb2.Properties.RegisterExtension(max_pv) -identification__pb2.Properties.RegisterExtension(avg_pv) -identification__pb2.Properties.RegisterExtension(is_cutoff) -identification__pb2.Properties.RegisterExtension(length) -identification__pb2.Properties.RegisterExtension(length_ratio) -major_axis.message_type = _VECTOR -identification__pb2.Properties.RegisterExtension(major_axis) -medium_axis.message_type = _VECTOR -identification__pb2.Properties.RegisterExtension(medium_axis) -minor_axis.message_type = _VECTOR -identification__pb2.Properties.RegisterExtension(minor_axis) -identification__pb2.Properties.RegisterExtension(major_axis_orientation_deg) - +if _descriptor._USE_C_DESCRIPTORS == False: + identification__pb2.Properties.RegisterExtension(centroid) + identification__pb2.Properties.RegisterExtension(volume_km3) + identification__pb2.Properties.RegisterExtension(volume_km2K) + identification__pb2.Properties.RegisterExtension(area_km2) + identification__pb2.Properties.RegisterExtension(min_bbox) + identification__pb2.Properties.RegisterExtension(max_bbox) + identification__pb2.Properties.RegisterExtension(max_pv) + identification__pb2.Properties.RegisterExtension(avg_pv) + identification__pb2.Properties.RegisterExtension(is_cutoff) + identification__pb2.Properties.RegisterExtension(length) + identification__pb2.Properties.RegisterExtension(length_ratio) + identification__pb2.Properties.RegisterExtension(major_axis) + identification__pb2.Properties.RegisterExtension(medium_axis) + identification__pb2.Properties.RegisterExtension(minor_axis) + identification__pb2.Properties.RegisterExtension(major_axis_orientation_deg) + + DESCRIPTOR._options = None + _VECTORGEO._serialized_start=43 + _VECTORGEO._serialized_end=95 + _VECTOR._serialized_start=97 + _VECTOR._serialized_end=138 # @@protoc_insertion_point(module_scope) diff --git a/enstools/feature/identification/_proto_gen/template_pb2.py b/enstools/feature/identification/_proto_gen/template_pb2.py index 1f05658cdcde048e2c792a2230b001cecd7e423b..054569478c763deaecc692ee8429af799d3f748c 100644 --- a/enstools/feature/identification/_proto_gen/template_pb2.py +++ b/enstools/feature/identification/_proto_gen/template_pb2.py @@ -1,13 +1,12 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: template.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database -from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,101 +15,30 @@ _sym_db = _symbol_database.Default() import identification_pb2 as identification__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='template.proto', - package='', - syntax='proto2', - serialized_pb=_b('\n\x0etemplate.proto\x1a\x14identification.proto\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x02(\x02\x12\t\n\x01y\x18\x02 \x02(\x02\x12\t\n\x01z\x18\x03 \x01(\x02:&\n\x08\x63\x65ntroid\x12\x0b.Properties\x18\x64 \x01(\x0b\x32\x07.Vector:\x19\n\x04size\x12\x0b.Properties\x18\x65 \x01(\x02:&\n\x11my_classification\x12\x0b.Properties\x18\x66 \x01(\x03') - , - dependencies=[identification__pb2.DESCRIPTOR,]) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0etemplate.proto\x1a\x14identification.proto\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x02(\x02\x12\t\n\x01y\x18\x02 \x02(\x02\x12\t\n\x01z\x18\x03 \x01(\x02:&\n\x08\x63\x65ntroid\x12\x0b.Properties\x18\x64 \x01(\x0b\x32\x07.Vector:\x19\n\x04size\x12\x0b.Properties\x18\x65 \x01(\x02:&\n\x11my_classification\x12\x0b.Properties\x18\x66 \x01(\x03') CENTROID_FIELD_NUMBER = 100 -centroid = _descriptor.FieldDescriptor( - name='centroid', full_name='centroid', index=0, - number=100, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +centroid = DESCRIPTOR.extensions_by_name['centroid'] SIZE_FIELD_NUMBER = 101 -size = _descriptor.FieldDescriptor( - name='size', full_name='size', index=1, - number=101, 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=True, extension_scope=None, - options=None, file=DESCRIPTOR) +size = DESCRIPTOR.extensions_by_name['size'] MY_CLASSIFICATION_FIELD_NUMBER = 102 -my_classification = _descriptor.FieldDescriptor( - name='my_classification', full_name='my_classification', index=2, - number=102, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=True, extension_scope=None, - options=None, file=DESCRIPTOR) - - -_VECTOR = _descriptor.Descriptor( - name='Vector', - full_name='Vector', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='x', full_name='Vector.x', index=0, - number=1, type=2, cpp_type=6, label=2, - 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='y', full_name='Vector.y', index=1, - number=2, type=2, cpp_type=6, label=2, - 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, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='z', full_name='Vector.z', 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, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - options=None, - is_extendable=False, - syntax='proto2', - extension_ranges=[], - oneofs=[ - ], - serialized_start=40, - serialized_end=81, -) - -DESCRIPTOR.message_types_by_name['Vector'] = _VECTOR -DESCRIPTOR.extensions_by_name['centroid'] = centroid -DESCRIPTOR.extensions_by_name['size'] = size -DESCRIPTOR.extensions_by_name['my_classification'] = my_classification -_sym_db.RegisterFileDescriptor(DESCRIPTOR) +my_classification = DESCRIPTOR.extensions_by_name['my_classification'] -Vector = _reflection.GeneratedProtocolMessageType('Vector', (_message.Message,), dict( - DESCRIPTOR = _VECTOR, - __module__ = 'template_pb2' +_VECTOR = DESCRIPTOR.message_types_by_name['Vector'] +Vector = _reflection.GeneratedProtocolMessageType('Vector', (_message.Message,), { + 'DESCRIPTOR' : _VECTOR, + '__module__' : 'template_pb2' # @@protoc_insertion_point(class_scope:Vector) - )) + }) _sym_db.RegisterMessage(Vector) -centroid.message_type = _VECTOR -identification__pb2.Properties.RegisterExtension(centroid) -identification__pb2.Properties.RegisterExtension(size) -identification__pb2.Properties.RegisterExtension(my_classification) +if _descriptor._USE_C_DESCRIPTORS == False: + identification__pb2.Properties.RegisterExtension(centroid) + identification__pb2.Properties.RegisterExtension(size) + identification__pb2.Properties.RegisterExtension(my_classification) + DESCRIPTOR._options = None + _VECTOR._serialized_start=40 + _VECTOR._serialized_end=81 # @@protoc_insertion_point(module_scope) diff --git a/enstools/feature/identification/pv_streamer/configuration.py b/enstools/feature/identification/pv_streamer/configuration.py index 1016f40b024f33a245b187ecd97dbad2130ae67b..0d2970b7bd87425dfaf15c0a8e90f156ecf27d15 100644 --- a/enstools/feature/identification/pv_streamer/configuration.py +++ b/enstools/feature/identification/pv_streamer/configuration.py @@ -68,7 +68,12 @@ class DetectionConfig: if config.longitude_dim is None: raise ValueError("Could not detect longitude dimension in dataset.") config.vertical_dim = get_vertical_dim(dataset) - if config.vertical_dim is None: + + config.pv_dim = get_pv_field_name(dataset) + if config.pv_dim is None: + raise ValueError("Error, can't find PV in dataset") + + if config.vertical_dim not in dataset[config.pv_dim].dims: print("Executing for 2 dimensions.") config.dims = 2 else: @@ -89,11 +94,6 @@ class DetectionConfig: else: config.res_z = -1 - # more strings to reference later - config.pv_dim = get_pv_field_name(dataset) - if config.pv_dim is None: - raise ValueError("Error, can't find PV in dataset") - # order of latitudes in dataset if (dataset.coords[config.latitude_dim][1].values - dataset.coords[config.latitude_dim][0].values) > 0: config.lat_order = 'asc' @@ -116,6 +116,7 @@ class DetectionConfig: config.lat_max = maxLat config.lon_indices_len = len(dataset.coords[config.longitude_dim].values) + config.lat_indices_len = len(dataset.coords[config.latitude_dim].values) if maxLon - minLon < 360 - config.res_lon: raise ValueError("Error: Longitude range not 360 degrees, needed in this algorithm for feasible results.") @@ -146,7 +147,7 @@ class DetectionConfig: ###### # includes config.alg.dH - if config.vtype is None: + if config.dims == 2: # 2D config.alg = PVConfig.get_default(dataset, config.vertical_dim) return config diff --git a/enstools/feature/identification/pv_streamer/data_util.py b/enstools/feature/identification/pv_streamer/data_util.py index 2cc551c26ca290cd870b4f9f3adee2c97002c1ff..50d924d32d517e95f6102e10e08312096c5f5fb3 100644 --- a/enstools/feature/identification/pv_streamer/data_util.py +++ b/enstools/feature/identification/pv_streamer/data_util.py @@ -1,8 +1,9 @@ import xarray as xr +import numpy as np import logging def get_pv_field_name(ds): - v_names = ["pv", "PV", "pv_avg200-500"] + v_names = ["pv", "PV", "pv_avg200-500", "PV_averaged"] for v_name in v_names: if v_name in ds.data_vars: return v_name @@ -27,7 +28,7 @@ def pv_to_pvu(ds, config): def pvu_to_pvu2(ds): # logic: pvu>-500(def) AND ((>0N and pvu>2) OR (<0N and pvu<-2)) - ds['pvu2'] = xr.ufuncs.logical_and(ds.pvu > -500.0, xr.ufuncs.logical_or(ds.pvu > 2.0, ds.pvu < -2.0)) + ds['pvu2'] = np.logical_and(ds.pvu > -500.0, np.logical_or(ds.pvu > 2.0, ds.pvu < -2.0)) return ds diff --git a/enstools/feature/identification/pv_streamer/identification.py b/enstools/feature/identification/pv_streamer/identification.py index ac03f070ebc80c46ab0fe0f22110610843e4929b..3ab7d2a888d3b2345ec784aa11cd5428ab644386 100644 --- a/enstools/feature/identification/pv_streamer/identification.py +++ b/enstools/feature/identification/pv_streamer/identification.py @@ -4,14 +4,14 @@ import xarray as xr import numpy as np import copy from enstools.feature.identification.pv_streamer.object_desc import get_object_data -from enstools.feature.identification.pv_streamer.projection_cdo import project_latlon_to_stereo +from enstools.feature.identification.pv_streamer.projection_cdo import project_latlon_to_stereo, project_stereo_to_latlon from enstools.feature.util.pb2_properties_api import ObjectProperties class PVIdentification(IdentificationTechnique): def __init__(self, unit='pv', mode_2d_layer=None, theta_range=None, extract_containing=None, centroid_lat_thr=None, - **kwargs): + out_type='stereo', **kwargs): """ Initialize the PV Identification. @@ -27,6 +27,8 @@ class PVIdentification(IdentificationTechnique): extract objects contains the selected layer (K) or overlaps with selected layer-range centroid_lat_thr only keep if centroid is north of this threshold + out_type + stereo or ll for latlon output kwargs """ @@ -40,6 +42,8 @@ class PVIdentification(IdentificationTechnique): self.sel_layer = extract_containing self.centroid_lat_thr = centroid_lat_thr # centroid < thr degree north -> discard self.layer_2d_id = mode_2d_layer + + self.out_type = out_type pass def precompute(self, dataset: xr.Dataset, **kwargs): @@ -57,8 +61,25 @@ class PVIdentification(IdentificationTechnique): self.config.centroid_lat_thr = self.centroid_lat_thr pv = dataset[self.config.pv_dim] - pv_tmp = xr.where(xr.ufuncs.logical_and(pv[self.config.latitude_dim] == 90, pv < -999), 10, pv) + # make invalid pole points valid + pv_tmp = xr.where(np.logical_and(pv[self.config.latitude_dim] == 90, pv <= -999), 10, pv) dataset[self.config.pv_dim].values = pv_tmp.transpose(*pv.dims).values + + # if we go later back to latlon, create grid desc. + if self.out_type == 'll': + import tempfile + with tempfile.NamedTemporaryFile(mode = "w", delete=False) as tmp: + self.tmp_gf_name = tmp.name + gf = ('gridtype = lonlat' + "\nxsize=" + str(self.config.lon_indices_len) + + "\nysize=" + str(self.config.lat_indices_len) + + "\nxfirst=" + str(self.config.lon_min) + + "\nyfirst=" + str(self.config.lat_min) + + "\nxinc=" + str(self.config.res_lon) + + "\nyinc=" + str(self.config.res_lat) + ) + tmp.write(gf) + + # transform dataset to stereographic stereo_ds = project_latlon_to_stereo(dataset) @@ -171,6 +192,19 @@ class PVIdentification(IdentificationTechnique): def postprocess(self, dataset: xr.Dataset, pb2_desc, **kwargs): - dropped = dataset.drop_vars(['pvu', 'pvu2']) - # TODO remove vertical dim if dataset was 2D. + dropped = dataset.drop_vars(['pvu', 'pvu2', 'lat_field', 'lon_field']) + + # if 2d remove 3rd dim + if self.config.dims == 2: + pv = dropped[self.config.pv_dim] + streamers = dropped['streamer'] + pv = pv.squeeze(dim=self.config.vertical_dim, drop=True) + streamers = streamers.squeeze(dim=self.config.vertical_dim, drop=True) + + dropped[self.config.pv_dim] = pv + dropped['streamer'] = streamers + + if self.out_type == 'll': + dropped = project_stereo_to_latlon(dropped, self.tmp_gf_name) + return dropped, pb2_desc diff --git a/enstools/feature/identification/pv_streamer/processing.py b/enstools/feature/identification/pv_streamer/processing.py index 942aa58b9ff0b79f3a02cd5b3ff1474558a7199c..66a0a121d13779bd477074ff8b9a0e5541e15115 100644 --- a/enstools/feature/identification/pv_streamer/processing.py +++ b/enstools/feature/identification/pv_streamer/processing.py @@ -68,8 +68,8 @@ def get_data_pole(distance_map): # flood reservoir: might have multiple: take biggest reservoir, this is the one starting at pole_index def flood_reservoir(inner_3d, pp_3d, pole_index): - inner_reservoir = flood(inner_3d, selem=struct3d1, seed_point=pole_index) - isolated_cutoffs = flood(pp_3d, selem=struct3d1, seed_point=pole_index) ^ pp_3d + inner_reservoir = flood(inner_3d, footprint=struct3d1, seed_point=pole_index) + isolated_cutoffs = flood(pp_3d, footprint=struct3d1, seed_point=pole_index) ^ pp_3d # 2D harder regarding reservoirs, here easy return inner_reservoir, isolated_cutoffs diff --git a/enstools/feature/identification/pv_streamer/projection_cdo.py b/enstools/feature/identification/pv_streamer/projection_cdo.py index 19d743564c0ff51d0184ddac5271bace5f7aa9c5..40969f1554d5830987b2d11fda6490e496e56341 100644 --- a/enstools/feature/identification/pv_streamer/projection_cdo.py +++ b/enstools/feature/identification/pv_streamer/projection_cdo.py @@ -75,3 +75,27 @@ def project_latlon_to_stereo(dataset: xr.Dataset): stereo_ds = cdo.remapbil("" + str(this_dir) + "/gridfile", input=dataset, returnXDataset=True) return stereo_ds + + +def project_stereo_to_latlon(dataset: xr.Dataset, gridfile_path): + + #lat_dim = get_latitude_dim(dataset) + #lon_dim = get_longitude_dim(dataset) + + #lon_field = xr.DataArray(coords=[dataset.coords[lat_dim], dataset.coords[lon_dim]]) + #lon_field = lon_field.where(False, lon_field[lon_dim]) + #lat_field = xr.DataArray(coords=[dataset.coords[lat_dim], dataset.coords[lon_dim]]) + #lat_field = lat_field.where(False, lat_field[lat_dim]) + + #dataset['lon_field'] = lon_field + #dataset['lat_field'] = lat_field + + cdo = Cdo() + cdo.debug = True + + this_dir = os.path.dirname(os.path.realpath(__file__)) # gridfile in same dir as this script + # be careful with interpolation scheme: for example interpolating lons might give wrong results at antimeridian + # remapbil: bilinear, remapnn: nearest neighbour + latlon_ds = cdo.remapnn(gridfile_path, input=dataset, returnXDataset=True) # nearest neighbour for streamers! + + return latlon_ds diff --git a/enstools/feature/identification/pv_streamer/run_identify.py b/enstools/feature/identification/pv_streamer/run_identify.py index b13a63354a4fc3a3bb96a34de08fe3bb23fcef81..ff1e15188bdd8d0366f2b85dd737f56dcdb85866 100644 --- a/enstools/feature/identification/pv_streamer/run_identify.py +++ b/enstools/feature/identification/pv_streamer/run_identify.py @@ -7,7 +7,7 @@ import os pipeline = FeaturePipeline() # init PVIdentification strategy, can take different parameters -i_strat = PVIdentification(unit='pv') #, mode_2d_layer=330) # theta_range=(300, 380), extract_containing_layer=330) +i_strat = PVIdentification(unit='pv', out_type='ll') #, mode_2d_layer=330) # theta_range=(300, 380), extract_containing_layer=330) # or strategy by Wernli and Sprenger (2007). Note: Fortran required and manual adaptation of scripts needed. # change contour.f level too, also if data in PV/PVU adapt param. @@ -28,9 +28,9 @@ pipeline.set_data_path(data_path) # execute pipeline pipeline.execute() -out_netcdf_path = data_path + '_streamers_stereo.nc' -out_json_path = data_path + '_streamers.json' -pipeline.save_result(description_type='json', description_path=out_json_path, dataset_path=out_netcdf_path) +out_netcdf_path = data_path + '_streamers.nc' +out_json_path = data_path + '_streamers_desc.json' +pipeline.save_result(description_type='json', description_path=out_json_path, dataset_path=out_netcdf_path,) # save_proj= diff --git a/install_instructions.txt b/install_instructions.txt index 6605db85fcf06ce58fa7c3d505c9fa5e5884db44..72b9e234b7b88c598fa9bdd7f87dcfe5187d16ec 100644 --- a/install_instructions.txt +++ b/install_instructions.txt @@ -5,17 +5,17 @@ # in enstools-package folder conda create --name enstools-feature python=3.7 -activate the environment +# activate the environment conda activate enstools-feature # needed for cdo over conda. do this first to avoid conflicts conda config --add channels conda-forge conda config --set channel_priority strict -conda install cdo +conda install cdo=1.9.10 # install requirements listed in venv_setup.sh pip install --upgrade pip -pip install ipykernel numpy wheel +pip install wheel numpy==1.20.0 # integrate enstools pip install -e git+https://github.com/wavestoweather/enstools.git@main#egg=enstools