org.apache.lucene.spatial.tier
Class DistanceHandler

java.lang.Object
  extended by org.apache.lucene.spatial.tier.DistanceHandler

public class DistanceHandler
extends Object

Provide a high level access point to distances Used by DistanceSortSource and DistanceQuery

NOTE: This API is still in flux and might change in incompatible ways in the next release.


Nested Class Summary
static class DistanceHandler.Precision
           
 
Constructor Summary
DistanceHandler(Map<Integer,Double> distances, Map<String,Double> distanceLookupCache, DistanceHandler.Precision precise)
           
 
Method Summary
 double getDistance(int docid, double centerLat, double centerLng, double lat, double lng)
           
 DistanceHandler.Precision getPrecision()
           
static double getPrecision(double x, DistanceHandler.Precision thisPrecise)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistanceHandler

public DistanceHandler(Map<Integer,Double> distances,
                       Map<String,Double> distanceLookupCache,
                       DistanceHandler.Precision precise)
Method Detail

getPrecision

public static double getPrecision(double x,
                                  DistanceHandler.Precision thisPrecise)

getPrecision

public DistanceHandler.Precision getPrecision()

getDistance

public double getDistance(int docid,
                          double centerLat,
                          double centerLng,
                          double lat,
                          double lng)

main

public static void main(String[] args)


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