org.apache.lucene.spatial.prefix.tree
Class SpatialPrefixTreeFactory

java.lang.Object
  extended by org.apache.lucene.spatial.prefix.tree.SpatialPrefixTreeFactory
Direct Known Subclasses:
GeohashPrefixTree.Factory, QuadPrefixTree.Factory

public abstract class SpatialPrefixTreeFactory
extends Object

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

Field Summary
protected  Map<String,String> args
           
protected  com.spatial4j.core.context.SpatialContext ctx
           
protected  Integer maxLevels
           
 
Constructor Summary
SpatialPrefixTreeFactory()
           
 
Method Summary
protected abstract  int getLevelForDistance(double degrees)
          Calls SpatialPrefixTree.getLevelForDistance(double).
protected  void init(Map<String,String> args, com.spatial4j.core.context.SpatialContext ctx)
           
protected  void initMaxLevels()
           
static SpatialPrefixTree makeSPT(Map<String,String> args, ClassLoader classLoader, com.spatial4j.core.context.SpatialContext ctx)
          The factory is looked up via "prefixTree" in args, expecting "geohash" or "quad".
protected abstract  SpatialPrefixTree newSPT()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

args

protected Map<String,String> args

ctx

protected com.spatial4j.core.context.SpatialContext ctx

maxLevels

protected Integer maxLevels
Constructor Detail

SpatialPrefixTreeFactory

public SpatialPrefixTreeFactory()
Method Detail

makeSPT

public static SpatialPrefixTree makeSPT(Map<String,String> args,
                                        ClassLoader classLoader,
                                        com.spatial4j.core.context.SpatialContext ctx)
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.


init

protected void init(Map<String,String> args,
                    com.spatial4j.core.context.SpatialContext ctx)

initMaxLevels

protected void initMaxLevels()

getLevelForDistance

protected abstract int getLevelForDistance(double degrees)
Calls SpatialPrefixTree.getLevelForDistance(double).


newSPT

protected abstract SpatialPrefixTree newSPT()


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.