RBushBase<T> class

RBush — a high-performance R-tree-based 2D spatial index for points and rectangles.

Implementers

Constructors

RBushBase({int maxEntries = 9, required RBushBox toBBox(T item), required MinXYGetter<T> getMinX, required MinXYGetter<T> getMinY})
Constructs a new r-tree with items of type T. Each leaf would have at most maxEntries items.

Properties

data ↔ _RBushNode<T>
getter/setter pair
getMinX → MinXYGetter<T>
final
getMinY → MinXYGetter<T>
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toBBox RBushBox Function(T item)
final

Methods

all() List<T>
Returns all items inside this tree.
clear() → dynamic
Removes all items from the tree.
collides(RBushBox bbox) bool
Tests if any items intersect with bbox. Use search if you need the list.
insert(T item) → dynamic
Inserts a single item into the tree.
knn(double x, double y, int k, {bool predicate(T item)?, double? maxDistance}) List<T>
K-nearest neighbors search.
load(Iterable<T> items) RBushBase<T>
Bulk loads items into this r-tree. This method returns this to allow for this chaining: RBushBase().load([...])
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(T? item) → dynamic
Removes a single item from the tree. Does nothing if the item is not there.
Looks for all items that intersect with bbox.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited