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.
Inherited Members
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 |
|
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 |
|
ArgumentOutOfRangeException |
|
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 |
|
ArgumentOutOfRangeException |
|
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
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
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
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 |
|
Returns
Type | Description |
---|---|
int | level [1 to maxLevels] |
Overrides
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 |