Documentation ¶
Overview ¶
Package index define spatial index interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHPRInsert = fmt.Errorf("hpr tree is built")
ErrHPRInsert ...
View Source
var ErrHPRNotIsIntersects = fmt.Errorf("hpr tree totalExtent is not Intersects")
ErrHPRNotIsIntersects ...
View Source
var ErrNotMatchType = fmt.Errorf("Operation does not support not match type arguments")
ErrNotMatchType ...
View Source
var ErrRTreeQueried = fmt.Errorf("Index cannot be added to once it has been queried")
ErrRTreeQueried ...
View Source
var ErrTreeIsNil = fmt.Errorf("Index is nil")
ErrTreeIsNil ...
Functions ¶
This section is empty.
Types ¶
type ArrayVisitor ¶
type ArrayVisitor struct {
ItemsArray []interface{}
}
ArrayVisitor Builds an array of all visited items.
func (*ArrayVisitor) VisitItem ¶
func (a *ArrayVisitor) VisitItem(item interface{})
VisitItem Visits an item.
type ItemVisitor ¶
type ItemVisitor interface { // VisitItem Visits an item in the index. VisitItem(item interface{}) Items() interface{} }
ItemVisitor A visitor for items in a SpatialIndex.
type LineSegmentVisitor ¶
type LineSegmentVisitor struct { // LineSegmentVisitor ItemVisitor subclass to reduce volume of query results. QuerySeg *matrix.LineSegment ItemsArrayLineSeg []*matrix.LineSegment }
LineSegmentVisitor ItemVisitor subclass to reduce volume of query results.
func (*LineSegmentVisitor) Items ¶
func (l *LineSegmentVisitor) Items() interface{}
Items returns items.
func (*LineSegmentVisitor) VisitItem ¶
func (l *LineSegmentVisitor) VisitItem(item interface{})
VisitItem ...
type SpatialIndex ¶
type SpatialIndex interface { // Insert Adds a spatial item with an extent specified by the given Envelope to the index Insert(itemEnv *envelope.Envelope, item interface{}) error // Query Queries the index for all items whose extents intersect the given search Envelope // Note that some kinds of indexes may also return objects which do not in fact // intersect the query envelope. Query(searchEnv *envelope.Envelope) interface{} // QueryVisitor Queries the index for all items whose extents intersect the given search Envelope, // and applies an ItemVisitor to them. // Note that some kinds of indexes may also return objects which do not in fact // intersect the query envelope. QueryVisitor(searchEnv *envelope.Envelope, visitor ItemVisitor) error // Remove Removes a single item from the tree. Remove(itemEnv *envelope.Envelope, item interface{}) bool }
SpatialIndex The basic operations supported implementing spatial index algorithms.
A spatial index typically provides a primary filter for range rectangle queries. A secondary filter is required to test for exact intersection. The secondary filter may consist of other kinds of tests, such as testing other spatial relationships.
Directories ¶
Path | Synopsis |
---|---|
Package hprtree a hprtree is a spatial index structure .
|
Package hprtree a hprtree is a spatial index structure . |
Package intervalrtree a tree is an R-tree index for one-dimensional intervals.
|
Package intervalrtree a tree is an R-tree index for one-dimensional intervals. |
Package kdtree A tree is a k-D tree index over 2-D point data.
|
Package kdtree A tree is a k-D tree index over 2-D point data. |
Package quadtree A Quadtree is a spatial index structure for efficient range querying
|
Package quadtree A Quadtree is a spatial index structure for efficient range querying |
Click to show internal directories.
Click to hide internal directories.