Search Results for

    Show / Hide Table of Contents

    Class QuadTree

    Constructs a Quad-tree node from a object list and creates its children recursively

    Inheritance
    object
    QuadTree
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Nts.Providers.Shapefile.Indexing
    Assembly: Mapsui.Nts.dll
    Syntax
    public class QuadTree : IDisposable

    Constructors

    | Edit this page View Source

    QuadTree(List<BoxObjects>, uint, Heuristic)

    Creates a node and either splits the objects recursively into sub-nodes, or stores them at the node depending on the heuristics. Tree is built top->down

    Declaration
    public QuadTree(List<QuadTree.BoxObjects> objList, uint depth, Heuristic heurdata)
    Parameters
    Type Name Description
    List<QuadTree.BoxObjects> objList

    Geometries to index

    uint depth

    Current depth of tree

    Heuristic heurdata

    Heuristics data

    Properties

    | Edit this page View Source

    Box

    Gets/sets the Axis Aligned Bounding Box

    Declaration
    public MRect? Box { get; set; }
    Property Value
    Type Description
    MRect
    | Edit this page View Source

    Child0

    Gets/sets the left child node

    Declaration
    public QuadTree? Child0 { get; set; }
    Property Value
    Type Description
    QuadTree
    | Edit this page View Source

    Child1

    Gets/sets the right child node

    Declaration
    public QuadTree? Child1 { get; set; }
    Property Value
    Type Description
    QuadTree
    | Edit this page View Source

    Depth

    Gets the depth of the current node in the tree

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

    IsLeaf

    Determines whether the node is a leaf (if data is stored at the node, we assume the node is a leaf)

    Declaration
    public bool IsLeaf { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    Dispose()

    Disposes the node

    Declaration
    public virtual void Dispose()
    | Edit this page View Source

    ErrorMetric(MRect)

    Calculate the floating point error metric

    Declaration
    public double ErrorMetric(MRect box)
    Parameters
    Type Name Description
    MRect box
    Returns
    Type Description
    double
    | Edit this page View Source

    FromFile(string)

    Loads a quadtree from a file

    Declaration
    public static QuadTree FromFile(string filename)
    Parameters
    Type Name Description
    string filename
    Returns
    Type Description
    QuadTree
    | Edit this page View Source

    SaveIndex(string)

    Saves the Quadtree to a file

    Declaration
    public void SaveIndex(string filename)
    Parameters
    Type Name Description
    string filename
    | Edit this page View Source

    Search(MRect)

    Searches the tree and looks for intersections with the BoundingBox 'bbox'

    Declaration
    public Collection<uint> Search(MRect box)
    Parameters
    Type Name Description
    MRect box

    BoundingBox to intersect with

    Returns
    Type Description
    Collection<uint>

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX