Class SpatialPrefixTreeFactory
java.lang.Object
org.apache.lucene.spatial.prefix.tree.SpatialPrefixTreeFactory
- Direct Known Subclasses:
GeohashPrefixTree.Factory
,QuadPrefixTree.Factory
,S2PrefixTree.Factory
Abstract Factory for creating
SpatialPrefixTree
instances with useful defaults and passed
on configurations defined in a Map.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
getLevelForDistance
(double degrees) Return the version of Lucene this tree will mimic the behavior of for analysis.protected void
protected void
protected void
static SpatialPrefixTree
makeSPT
(Map<String, String> args, ClassLoader classLoader, org.locationtech.spatial4j.context.SpatialContext ctx) The factory is looked up via "prefixTree" in args, expecting "geohash" or "quad".protected abstract SpatialPrefixTree
newSPT()
void
Set the version of Lucene this tree should mimic the behavior for for analysis.
-
Field Details
-
PREFIX_TREE
- See Also:
-
MAX_LEVELS
- See Also:
-
MAX_DIST_ERR
- See Also:
-
VERSION
- See Also:
-
args
-
ctx
protected org.locationtech.spatial4j.context.SpatialContext ctx -
maxLevels
-
-
Constructor Details
-
SpatialPrefixTreeFactory
public SpatialPrefixTreeFactory()
-
-
Method Details
-
makeSPT
public static SpatialPrefixTree makeSPT(Map<String, String> args, ClassLoader classLoader, org.locationtech.spatial4j.context.SpatialContext ctx) The factory is looked up via "prefixTree" in args, expecting "geohash" or "quad". If it's neither of these, then "geohash" is chosen for a geo context, otherwise "quad" is chosen. The "version" arg, if present, is parsed withVersion
and the prefix tree might be sensitive to it. -
init
-
initVersion
protected void initVersion() -
initMaxLevels
protected void initMaxLevels() -
setVersion
Set the version of Lucene this tree should mimic the behavior for for analysis. -
getVersion
Return the version of Lucene this tree will mimic the behavior of for analysis. -
getLevelForDistance
protected abstract int getLevelForDistance(double degrees) -
newSPT
-