Class AbstractNode<T, TItem>
A node of an AbstractSTRtree<T, TItem>. A node is one of:
- an interior node containing child AbstractNode<T, TItem>s
- a leaf node containing data items (ItemBoundable<T, TItem>s).
Implements
Inherited Members
Namespace: NetTopologySuite.Index.Strtree
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public abstract class AbstractNode<T, TItem> : IBoundable<T, TItem> where T : IIntersectable<T>, IExpandable<T>
Type Parameters
Name | Description |
---|---|
T | |
TItem |
Constructors
| Improve this Doc View SourceAbstractNode(Int32)
Constructs an AbstractNode at the given level in the tree
Declaration
protected AbstractNode(int level)
Parameters
Type | Name | Description |
---|---|---|
Int32 | level | 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the root node will have the highest level. |
Properties
| Improve this Doc View SourceBounds
Gets the bounds of this node
Declaration
public T Bounds { get; }
Property Value
Type | Description |
---|---|
T |
ChildBoundables
Returns either child AbstractNode<T, TItem>s, or if this is a leaf node, real data (wrapped in ItemBoundable<T, TItem>s).
Declaration
public IList<IBoundable<T, TItem>> ChildBoundables { get; set; }
Property Value
Type | Description |
---|---|
IList<IBoundable<T, TItem>> |
Count
Gets the count of the IBoundable<T, TItem>s at this node.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsEmpty
Tests whether there are any IBoundable<T, TItem>s at this node.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item
Declaration
public TItem Item { get; }
Property Value
Type | Description |
---|---|
TItem |
Level
Returns 0 if this node is a leaf, 1 if a parent of a leaf, and so on; the root node will have the highest level.
Declaration
public int Level { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceAddChildBoundable(IBoundable<T, TItem>)
Adds either an AbstractNode, or if this is a leaf node, a data object (wrapped in an ItemBoundable).
Declaration
public void AddChildBoundable(IBoundable<T, TItem> childBoundable)
Parameters
Type | Name | Description |
---|---|---|
IBoundable<T, TItem> | childBoundable | The child to add. |
ComputeBounds()
Returns a representation of space that encloses this Boundable, preferably not much bigger than this Boundable's boundary yet fast to test for intersection with the bounds of other Boundables. The class of object returned depends on the subclass of AbstractSTRtree.
Declaration
protected abstract T ComputeBounds()
Returns
Type | Description |
---|---|
T | An Envelope (for STRtrees), an Interval (for SIRtrees), or other object (for other subclasses of AbstractSTRtree). |