Documentation
¶
Index ¶
- Variables
- type RTree
- func (*RTree) Descriptor() ([]byte, []int)deprecated
- func (x *RTree) GetBoxes() []int64
- func (x *RTree) GetCount() uint32
- func (x *RTree) GetPrecision() uint32
- func (x *RTree) GetRefs() []int64
- func (*RTree) ProtoMessage()
- func (x *RTree) ProtoReflect() protoreflect.Message
- func (x *RTree) Reset()
- func (m *RTree) SizeVT() (n int)
- func (x *RTree) String() string
- func (m *RTree) UnmarshalVT(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
View Source
var File_flatrtree_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type RTree ¶
type RTree struct {
//
// `count` is the number of items in the tree.
//
Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
//
// `refs[:count]` are external references to the items being indexed.
// The values are generally determined by insertion order, but can be
// any 64-bit integer.
//
// `refs[count:]` are internal references to positions in the `boxes`
// list, and represent the start position of child bounding boxes for
// a node. We can retrieve sibling boxes using pairwise references:
//
// boxes[refs[i]:refs[i+1]]
//
// The position of a reference in `refs` corresponds to the position
// of its bounding box in `boxes`. The reference for the bounding box
// at `boxes[i:i+4]` is `refs[i/4]`.
//
// The layout of `refs` might look like this, where the number of
// levels depends on node size and the number of items:
// +-----------------------------------------------------------+
// | level 3 (leaves) | level 2 | level 1 | root |
// +-----------------------------------------------------------+
// ^
// refs[count]
//
Refs []int64 `protobuf:"varint,2,rep,packed,name=refs,proto3" json:"refs,omitempty"`
//
// `boxes` is a flat list of 2-D axis-aligned bounding boxes.
//
// `boxes[:count*4]` are the external item bounding boxes.
// `boxes[count*4:]` are the internal node bounding boxes.
//
// The layout of `boxes` might look like this, where the number of
// levels depends on node size and the number of items:
// +-----------------------------------------------------------+
// | level 3 (leaves) | level 2 | level 1 | root |
// +-----------------------------------------------------------+
// ^
// boxes[count*4]
//
// Bounding boxes are encoded as min point and max point:
//
// xmin, ymin, xmax, ymax
//
// The coordinate values are multiplied by `10^precision` and
// stored as signed, 64-bit integers in order to take advantage
// of varint encoding to reduce the size in bytes. This technique
// is borrowed from the Geobuf protobuf format.
//
Boxes []int64 `protobuf:"zigzag64,3,rep,packed,name=boxes,proto3" json:"boxes,omitempty"`
//
// `precision` is used to convert 64-bit float coordinates
// to/from signed integers.
//
Precision uint32 `protobuf:"varint,4,opt,name=precision,proto3" json:"precision,omitempty"`
// contains filtered or unexported fields
}
func (*RTree) Descriptor
deprecated
func (*RTree) GetPrecision ¶
func (*RTree) ProtoMessage ¶
func (*RTree) ProtoMessage()
func (*RTree) ProtoReflect ¶
func (x *RTree) ProtoReflect() protoreflect.Message
func (*RTree) UnmarshalVT ¶
Click to show internal directories.
Click to hide internal directories.