Class GeohashPrefixTree
A SpatialPrefixTree based on Geohashes. Uses Spatial4n.Util.GeohashUtils to do all the geohash work.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Spatial.Prefix.Tree
Assembly: Lucene.Net.Spatial.dll
Syntax
public class GeohashPrefixTree : SpatialPrefixTree
Constructors
| Improve this Doc View SourceGeohashPrefixTree(SpatialContext, Int32)
Initializes a new instance of GeohashPrefixTree with the specified
spatial context (ctx) and maxLevels.
Declaration
public GeohashPrefixTree(SpatialContext ctx, int maxLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| Spatial4n.Context.SpatialContext | ctx | The spatial context. |
| System.Int32 | maxLevels | The maximum number of levels in the tree. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentOutOfRangeException |
|
Properties
| Improve this Doc View SourceMaxLevelsPossible
Any more than this and there's no point (double lat & lon are the same).
Declaration
public static int MaxLevelsPossible { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
| Improve this Doc View SourceGetCell(IPoint, Int32)
Declaration
protected override Cell GetCell(IPoint p, int level)
Parameters
| Type | Name | Description |
|---|---|---|
| Spatial4n.Shapes.IPoint | p | |
| System.Int32 | level |
Returns
| Type | Description |
|---|---|
| Cell |
Overrides
| Improve this Doc View SourceGetCell(Byte[], Int32, Int32)
Declaration
public override Cell GetCell(byte[] bytes, int offset, int len)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | bytes | |
| System.Int32 | offset | |
| System.Int32 | len |
Returns
| Type | Description |
|---|---|
| Cell |
Overrides
| Improve this Doc View SourceGetCell(String)
Declaration
public override Cell GetCell(string token)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | token |
Returns
| Type | Description |
|---|---|
| Cell |
Overrides
| Improve this Doc View SourceGetLevelForDistance(Double)
Declaration
public override int GetLevelForDistance(double dist)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | dist |
Returns
| Type | Description |
|---|---|
| System.Int32 |