Documentation ¶
Index ¶
- type RTreeIndex
- func (store *RTreeIndex) AddShape(shape geometry.Shape)
- func (store *RTreeIndex) AddShapes(shapes []geometry.Shape)
- func (store *RTreeIndex) FindShapesWhichContainsPoint(point geometry.Point) []geometry.Shape
- func (store *RTreeIndex) FindShapesWhichContainsShape(shape geometry.Shape) []geometry.Shape
- func (store *RTreeIndex) GetShapeByName(shapeName string) (geometry.Shape, error)
- func (store *RTreeIndex) RemoveShapeByName(shapeName string) (geometry.Shape, error)
- type SimpleIndex
- func (store *SimpleIndex) AddShape(shape geometry.Shape)
- func (store *SimpleIndex) AddShapes(shapes []geometry.Shape)
- func (store *SimpleIndex) FindShapesWhichContainsPoint(point geometry.Point) []geometry.Shape
- func (store *SimpleIndex) FindShapesWhichContainsShape(shape geometry.Shape) []geometry.Shape
- func (store *SimpleIndex) GetShapeByName(shapeName string) (geometry.Shape, error)
- func (store *SimpleIndex) RemoveShapeByName(shapeName string) (geometry.Shape, error)
- type TriaIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RTreeIndex ¶
type RTreeIndex struct {
// contains filtered or unexported fields
}
func NewRTreeIndex ¶
func NewRTreeIndex() *RTreeIndex
func NewRTreeIndexFromModel ¶
func NewRTreeIndexFromModel(shapeModels []model.Shape) *RTreeIndex
func (*RTreeIndex) AddShape ¶
func (store *RTreeIndex) AddShape(shape geometry.Shape)
func (*RTreeIndex) AddShapes ¶
func (store *RTreeIndex) AddShapes(shapes []geometry.Shape)
AddShapes ...
func (*RTreeIndex) FindShapesWhichContainsPoint ¶
func (store *RTreeIndex) FindShapesWhichContainsPoint(point geometry.Point) []geometry.Shape
FindShapesWhichContainsPoint ...
func (*RTreeIndex) FindShapesWhichContainsShape ¶
func (store *RTreeIndex) FindShapesWhichContainsShape(shape geometry.Shape) []geometry.Shape
FindShapesWhichContainsShape ...
func (*RTreeIndex) GetShapeByName ¶
func (store *RTreeIndex) GetShapeByName(shapeName string) (geometry.Shape, error)
GetShapeByName ...
func (*RTreeIndex) RemoveShapeByName ¶
func (store *RTreeIndex) RemoveShapeByName(shapeName string) (geometry.Shape, error)
RemoveShapeByName ...
type SimpleIndex ¶
SimpleIndex is a simple store with no optmizations and implements Store from Tria
func NewSimpleIndex ¶
func NewSimpleIndex() *SimpleIndex
NewSimpleIndex returns an initialized SimpleIndex
func NewSimpleIndexFromModel ¶
func NewSimpleIndexFromModel(shapeModels []model.Shape) *SimpleIndex
NewSimpleIndexFromModel returns an initialized SimpleIndex with index populated from a list of shapes
func (*SimpleIndex) AddShape ¶
func (store *SimpleIndex) AddShape(shape geometry.Shape)
AddShape ...
func (*SimpleIndex) AddShapes ¶
func (store *SimpleIndex) AddShapes(shapes []geometry.Shape)
AddShapes ...
func (*SimpleIndex) FindShapesWhichContainsPoint ¶
func (store *SimpleIndex) FindShapesWhichContainsPoint(point geometry.Point) []geometry.Shape
FindShapesWhichContainsPoint ...
func (*SimpleIndex) FindShapesWhichContainsShape ¶
func (store *SimpleIndex) FindShapesWhichContainsShape(shape geometry.Shape) []geometry.Shape
FindShapesWhichContainsShape ...
func (*SimpleIndex) GetShapeByName ¶
func (store *SimpleIndex) GetShapeByName(shapeName string) (geometry.Shape, error)
GetShapeByName ...
func (*SimpleIndex) RemoveShapeByName ¶
func (store *SimpleIndex) RemoveShapeByName(shapeName string) (geometry.Shape, error)
RemoveShapeByName ...
type TriaIndex ¶
type TriaIndex interface { // AddShape adds a shape to the current TriaIndex AddShape(geometry.Shape) // AddShapes add multiple shapes to the current TriaIndex AddShapes([]geometry.Shape) // GetShapeByName returns a shape by name if found, otherwise error GetShapeByName(string) (geometry.Shape, error) // RemoveShapeByName removes a shape by name if found and returns it, otherwise error RemoveShapeByName(string) (geometry.Shape, error) // FindShapesWhichContains checks the store shapes if it contains with given point FindShapesWhichContainsPoint(geometry.Point) []geometry.Shape // FindShapesWhichContainsShape checks the store shapes if it contains with given shape FindShapesWhichContainsShape(geometry.Shape) []geometry.Shape }
TriaIndex is a interface for handling searching and storing of shapes
Click to show internal directories.
Click to hide internal directories.