Search Results for

    Show / Hide Table of Contents

    Class AbstractSTRtree<T, TItem>

    Base class for STRtree and SIRtree. STR-packed R-trees are described in: P. Rigaux, Michel Scholl and Agnes Voisard. Spatial Databases With Application To GIS. Morgan Kaufmann, San Francisco, 2002.

    This implementation is based on IBoundable<T, TItem>s rather than just AbstractNode<T, TItem>s, because the STR algorithm operates on both nodes and data, both of which are treated as IBoundable<T, TItem>s.

    Inheritance
    object
    AbstractSTRtree<T, TItem>
    SIRtree<TItem>
    STRtree<TItem>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Index.Strtree
    Assembly: NetTopologySuite.dll
    Syntax
    [Serializable]
    public abstract class AbstractSTRtree<T, TItem> where T : IIntersectable<T>, IExpandable<T>
    Type Parameters
    Name Description
    T
    TItem

    Constructors

    | Edit this page View Source

    AbstractSTRtree(int)

    Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have.

    Declaration
    protected AbstractSTRtree(int nodeCapacity)
    Parameters
    Type Name Description
    int nodeCapacity
    | Edit this page View Source

    AbstractSTRtree(int, AbstractNode<T, TItem>)

    Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have, and the root node

    Declaration
    protected AbstractSTRtree(int nodeCapacity, AbstractNode<T, TItem> root)
    Parameters
    Type Name Description
    int nodeCapacity

    The maximum number of child nodes in a node

    AbstractNode<T, TItem> root

    The root node that links to all other nodes in the tree

    | Edit this page View Source

    AbstractSTRtree(int, IList<IBoundable<T, TItem>>)

    Constructs an AbstractSTRtree with the specified maximum number of child nodes that a node may have, and all leaf nodes in the tree

    Declaration
    protected AbstractSTRtree(int nodeCapacity, IList<IBoundable<T, TItem>> itemBoundables)
    Parameters
    Type Name Description
    int nodeCapacity

    The maximum number of child nodes in a node

    IList<IBoundable<T, TItem>> itemBoundables

    The list of leaf nodes in the tree

    Properties

    | Edit this page View Source

    Count

    Gets the number of elements in the tree

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Depth

    Gets the number of levels in the tree.

    Declaration
    public int Depth { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IntersectsOp

    Declaration
    protected abstract AbstractSTRtree<T, TItem>.IIntersectsOp IntersectsOp { get; }
    Property Value
    Type Description
    AbstractSTRtree<T, TItem>.IIntersectsOp

    A test for intersection between two bounds, necessary because subclasses of AbstractSTRtree have different implementations of bounds.

    | Edit this page View Source

    IsEmpty

    Tests whether the index contains any items. This method does not build the index, so items can still be inserted after it has been called.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    ItemBoundables

    Gets a value indicating the boundable items that have to be included in the index

    Declaration
    public IList<IBoundable<T, TItem>> ItemBoundables { get; }
    Property Value
    Type Description
    IList<IBoundable<T, TItem>>

    A list of boundable items

    | Edit this page View Source

    NodeCapacity

    Gets the maximum number of child nodes that a node may have.

    Declaration
    public int NodeCapacity { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Root

    Gets the root node of the tree.

    Declaration
    public AbstractNode<T, TItem> Root { get; protected set; }
    Property Value
    Type Description
    AbstractNode<T, TItem>

    Methods

    | Edit this page View Source

    BoundablesAtLevel(int)

    Declaration
    protected IList<IBoundable<T, TItem>> BoundablesAtLevel(int level)
    Parameters
    Type Name Description
    int level
    Returns
    Type Description
    IList<IBoundable<T, TItem>>
    | Edit this page View Source

    Build()

    Creates parent nodes, grandparent nodes, and so forth up to the root node, for the data that has been inserted into the tree. Can only be called once, and thus can be called only after all of the data has been inserted into the tree.

    Declaration
    public void Build()
    | Edit this page View Source

    CompareDoubles(double, double)

    Declaration
    protected static int CompareDoubles(double a, double b)
    Parameters
    Type Name Description
    double a
    double b
    Returns
    Type Description
    int
    | Edit this page View Source

    CreateNode(int)

    Declaration
    protected abstract AbstractNode<T, TItem> CreateNode(int level)
    Parameters
    Type Name Description
    int level
    Returns
    Type Description
    AbstractNode<T, TItem>
    | Edit this page View Source

    CreateParentBoundables(IList<IBoundable<T, TItem>>, int)

    Sorts the childBoundables then divides them into groups of size M, where M is the node capacity.

    Declaration
    protected virtual IList<IBoundable<T, TItem>> CreateParentBoundables(IList<IBoundable<T, TItem>> childBoundables, int newLevel)
    Parameters
    Type Name Description
    IList<IBoundable<T, TItem>> childBoundables
    int newLevel
    Returns
    Type Description
    IList<IBoundable<T, TItem>>
    | Edit this page View Source

    GetComparer()

    Declaration
    protected abstract IComparer<IBoundable<T, TItem>> GetComparer()
    Returns
    Type Description
    IComparer<IBoundable<T, TItem>>
    | Edit this page View Source

    GetDepth(AbstractNode<T, TItem>)

    Declaration
    protected int GetDepth(AbstractNode<T, TItem> node)
    Parameters
    Type Name Description
    AbstractNode<T, TItem> node
    Returns
    Type Description
    int
    | Edit this page View Source

    GetSize(AbstractNode<T, TItem>)

    Declaration
    protected int GetSize(AbstractNode<T, TItem> node)
    Parameters
    Type Name Description
    AbstractNode<T, TItem> node
    Returns
    Type Description
    int
    | Edit this page View Source

    Insert(T, TItem)

    Declaration
    protected void Insert(T bounds, TItem item)
    Parameters
    Type Name Description
    T bounds
    TItem item
    | Edit this page View Source

    ItemsTree()

    Gets a tree structure (as a nested list) corresponding to the structure of the items and nodes in this tree. The returned Lists contain either Object items, or Lists which correspond to subtrees of the tree Subtrees which do not contain any items are not included. Builds the tree if necessary.

    Declaration
    public IList<object> ItemsTree()
    Returns
    Type Description
    IList<object>

    a List of items and/or Lists

    | Edit this page View Source

    LastNode(IList<IBoundable<T, TItem>>)

    Declaration
    protected AbstractNode<T, TItem> LastNode(IList<IBoundable<T, TItem>> nodes)
    Parameters
    Type Name Description
    IList<IBoundable<T, TItem>> nodes
    Returns
    Type Description
    AbstractNode<T, TItem>
    | Edit this page View Source

    Query(T)

    Also builds the tree, if necessary.

    Declaration
    protected IList<TItem> Query(T searchBounds)
    Parameters
    Type Name Description
    T searchBounds
    Returns
    Type Description
    IList<TItem>
    | Edit this page View Source

    Query(T, IItemVisitor<TItem>)

    Declaration
    protected void Query(T searchBounds, IItemVisitor<TItem> visitor)
    Parameters
    Type Name Description
    T searchBounds
    IItemVisitor<TItem> visitor
    | Edit this page View Source

    Remove(T, TItem)

    Removes an item from the tree. (Builds the tree, if necessary.)

    Declaration
    protected bool Remove(T searchBounds, TItem item)
    Parameters
    Type Name Description
    T searchBounds
    TItem item
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX