Class SpatialPrefixTreeFactory
Abstract Factory for creating SpatialPrefixTree instances with useful defaults and passed on configurations defined in a System.Collections.Generic.IDictionary<TKey, TValue>.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
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)
System.Object.ToString()
Namespace: Lucene.Net.Spatial.Prefix.Tree
Assembly: Lucene.Net.Spatial.dll
Syntax
public abstract class SpatialPrefixTreeFactory
Fields
| Improve this Doc View Sourcem_args
Declaration
protected IDictionary<string, string> m_args
Field Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
m_ctx
Declaration
protected SpatialContext m_ctx
Field Value
Type | Description |
---|---|
Spatial4n.Core.Context.SpatialContext |
m_maxLevels
Declaration
protected int? m_maxLevels
Field Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
MAX_DIST_ERR
Declaration
public const string MAX_DIST_ERR = "maxDistErr"
Field Value
Type | Description |
---|---|
System.String |
MAX_LEVELS
Declaration
public const string MAX_LEVELS = "maxLevels"
Field Value
Type | Description |
---|---|
System.String |
PREFIX_TREE
Declaration
public const string PREFIX_TREE = "prefixTree"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceGetLevelForDistance(Double)
Calls GetLevelForDistance(Double).
Declaration
protected abstract int GetLevelForDistance(double degrees)
Parameters
Type | Name | Description |
---|---|---|
System.Double | degrees |
Returns
Type | Description |
---|---|
System.Int32 |
Init(IDictionary<String, String>, SpatialContext)
Declaration
protected virtual void Init(IDictionary<string, string> args, SpatialContext ctx)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | args | |
Spatial4n.Core.Context.SpatialContext | ctx |
InitMaxLevels()
Declaration
protected virtual void InitMaxLevels()
MakeSPT(IDictionary<String, String>, SpatialContext)
The factory is looked up via "prefixTree" in args
, expecting "geohash" or "quad".
Declaration
public static SpatialPrefixTree MakeSPT(IDictionary<string, string> args, SpatialContext ctx)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | args | |
Spatial4n.Core.Context.SpatialContext | ctx |
Returns
Type | Description |
---|---|
SpatialPrefixTree |
Remarks
The factory is looked up via "prefixTree" in args
, expecting "geohash" or "quad".
If its neither of these, then "geohash" is chosen for a geo context, otherwise "quad" is chosen.
NewSPT()
Declaration
protected abstract SpatialPrefixTree NewSPT()
Returns
Type | Description |
---|---|
SpatialPrefixTree |