Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class QuadPrefixTree

    A SpatialPrefixTree which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    SpatialPrefixTree
    QuadPrefixTree
    Inherited Members
    SpatialPrefixTree.m_maxLevels
    SpatialPrefixTree.m_ctx
    SpatialPrefixTree.SpatialContext
    SpatialPrefixTree.MaxLevels
    SpatialPrefixTree.ToString()
    SpatialPrefixTree.GetDistanceForLevel(int)
    SpatialPrefixTree.WorldCell
    SpatialPrefixTree.GetCell(byte[], int, int, Cell)
    SpatialPrefixTree.GetCells(IShape, int, bool, bool)
    SpatialPrefixTree.GetCells(IPoint, int, bool)
    SpatialPrefixTree.CellsToTokenStrings(ICollection<Cell>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Spatial.Prefix.Tree
    Assembly: Lucene.Net.Spatial.dll
    Syntax
    public class QuadPrefixTree : SpatialPrefixTree

    Constructors

    QuadPrefixTree(SpatialContext)

    Initializes a new instance of QuadPrefixTree with the specified spatial context (ctx).

    Declaration
    public QuadPrefixTree(SpatialContext ctx)
    Parameters
    Type Name Description
    SpatialContext ctx

    The spatial context.

    Exceptions
    Type Condition
    ArgumentNullException

    ctx is null.

    QuadPrefixTree(SpatialContext, IRectangle, int)

    Initializes a new instance of QuadPrefixTree with the specified spatial context (ctx), bounds and maxLevels.

    Declaration
    public QuadPrefixTree(SpatialContext ctx, IRectangle bounds, int maxLevels)
    Parameters
    Type Name Description
    SpatialContext ctx

    The spatial context.

    IRectangle bounds

    The bounded rectangle.

    int maxLevels

    The maximum number of levels in the tree.

    Exceptions
    Type Condition
    ArgumentNullException

    ctx or bounds is null.

    ArgumentOutOfRangeException

    maxLevels is less than or equal to 0.

    QuadPrefixTree(SpatialContext, int)

    Initializes a new instance of QuadPrefixTree with the specified spatial context (ctx) and maxLevels.

    Declaration
    public QuadPrefixTree(SpatialContext ctx, int maxLevels)
    Parameters
    Type Name Description
    SpatialContext ctx

    The spatial context.

    int maxLevels

    The maximum number of levels in the tree.

    Exceptions
    Type Condition
    ArgumentNullException

    ctx is null.

    ArgumentOutOfRangeException

    maxLevels is less than or equal to 0.

    Fields

    DEFAULT_MAX_LEVELS

    A SpatialPrefixTree which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public const int DEFAULT_MAX_LEVELS = 12
    Field Value
    Type Description
    int

    MAX_LEVELS_POSSIBLE

    A SpatialPrefixTree which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public const int MAX_LEVELS_POSSIBLE = 50
    Field Value
    Type Description
    int

    Properties

    GridH

    A SpatialPrefixTree which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public double GridH { get; }
    Property Value
    Type Description
    double

    Methods

    GetCell(IPoint, int)

    Returns the cell containing point p at the specified level.

    Declaration
    protected override Cell GetCell(IPoint p, int level)
    Parameters
    Type Name Description
    IPoint p
    int level
    Returns
    Type Description
    Cell
    Overrides
    SpatialPrefixTree.GetCell(IPoint, int)

    GetCell(byte[], int, int)

    A SpatialPrefixTree which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public override Cell GetCell(byte[] bytes, int offset, int length)
    Parameters
    Type Name Description
    byte[] bytes
    int offset
    int length
    Returns
    Type Description
    Cell
    Overrides
    SpatialPrefixTree.GetCell(byte[], int, int)

    GetCell(string)

    The cell for the specified token.

    Declaration
    public override Cell GetCell(string token)
    Parameters
    Type Name Description
    string token
    Returns
    Type Description
    Cell
    Overrides
    SpatialPrefixTree.GetCell(string)
    Remarks

    The cell for the specified token. The empty string should be equal to WorldCell. Precondition: Never called when token length > maxLevel.

    GetLevelForDistance(double)

    Returns the level of the largest grid in which its longest side is less than or equal to the provided distance (in degrees).

    Declaration
    public override int GetLevelForDistance(double dist)
    Parameters
    Type Name Description
    double dist

    = 0

    Returns
    Type Description
    int

    level [1 to maxLevels]

    Overrides
    SpatialPrefixTree.GetLevelForDistance(double)
    Remarks

    Returns the level of the largest grid in which its longest side is less than or equal to the provided distance (in degrees). Consequently dist acts as an error epsilon declaring the amount of detail needed in the grid, such that you can get a grid with just the right amount of precision.

    PrintInfo(TextWriter)

    A SpatialPrefixTree which uses a quad tree in which an indexed term will be generated for each cell, 'A', 'B', 'C', 'D'.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public virtual void PrintInfo(TextWriter output)
    Parameters
    Type Name Description
    TextWriter output
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.