Class NodeBase<T>
The base class for nodes in a Quadtree
.
Assembly: NetTopologySuite.dll
Syntax
[Serializable]
public abstract class NodeBase<T>
Type Parameters
Fields
|
Edit this page
View Source
Subnode
subquads are numbered as follows:
2 | 3
--+--
0 | 1
Declaration
protected Node<T>[] Subnode
Field Value
Type |
Description |
Node<T>[] |
|
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
Depth
Declaration
public int Depth { get; }
Property Value
|
Edit this page
View Source
HasChildren
Declaration
public bool HasChildren { get; }
Property Value
|
Edit this page
View Source
HasItems
Declaration
public bool HasItems { get; }
Property Value
|
Edit this page
View Source
IsEmpty
Gets a value indicating that this node is empty, i.e. it does not contain an items or sub-nodes.
Declaration
public bool IsEmpty { get; }
Property Value
|
Edit this page
View Source
IsPrunable
Declaration
public bool IsPrunable { get; }
Property Value
|
Edit this page
View Source
Items
Declaration
public IList<T> Items { get; protected set; }
Property Value
Type |
Description |
IList<T> |
|
|
Edit this page
View Source
NodeCount
Declaration
public int NodeCount { get; }
Property Value
Methods
|
Edit this page
View Source
Add(T)
Declaration
Parameters
Type |
Name |
Description |
T |
item |
|
|
Edit this page
View Source
AddAllItems(ref IList<T>)
Insert items in this
into the parameter!
Declaration
public IList<T> AddAllItems(ref IList<T> resultItems)
Parameters
Type |
Name |
Description |
IList<T> |
resultItems |
IList for adding items.
|
Returns
Type |
Description |
IList<T> |
Parameter IList with this items.
|
|
Edit this page
View Source
AddAllItemsFromOverlapping(Envelope, ref IList<T>)
Declaration
public void AddAllItemsFromOverlapping(Envelope searchEnv, ref IList<T> resultItems)
Parameters
|
Edit this page
View Source
GetSubnodeIndex(Envelope, double, double)
Gets the index of the subquad that wholly contains the given envelope.
If none does, returns -1.
Declaration
public static int GetSubnodeIndex(Envelope env, double centreX, double centreY)
Parameters
Returns
Type |
Description |
int |
The index of the subquad that wholly contains the given envelope
or -1 if no subquad wholly contains the envelope
|
|
Edit this page
View Source
IsSearchMatch(Envelope)
Declaration
protected abstract bool IsSearchMatch(Envelope searchEnv)
Parameters
Type |
Name |
Description |
Envelope |
searchEnv |
|
Returns
|
Edit this page
View Source
Query(Envelope, Func<T, bool>)
Declaration
public IEnumerable<T> Query(Envelope searchEnv, Func<T, bool> predicate)
Parameters
Returns
|
Edit this page
View Source
Remove(Envelope, T)
Removes a single item from this subtree.
Declaration
public bool Remove(Envelope itemEnv, T item)
Parameters
Type |
Name |
Description |
Envelope |
itemEnv |
The envelope containing the item.
|
T |
item |
The item to remove.
|
Returns
Type |
Description |
bool |
true if the item was found and removed.
|
|
Edit this page
View Source
Visit(Envelope, IItemVisitor<T>)
Declaration
public void Visit(Envelope searchEnv, IItemVisitor<T> visitor)
Parameters