org.apache.lucene.spatial.query
Class SpatialArgs

java.lang.Object
  extended by org.apache.lucene.spatial.query.SpatialArgs

public class SpatialArgs
extends Object

Principally holds the query Shape and the SpatialOperation.

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

Field Summary
static double DEFAULT_DIST_PRECISION
           
 
Constructor Summary
SpatialArgs(SpatialOperation operation)
           
SpatialArgs(SpatialOperation operation, com.spatial4j.core.shape.Shape shape)
           
 
Method Summary
 Double getDistPrecision()
          The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable error.
 Double getMax()
           
 Double getMin()
           
 SpatialOperation getOperation()
           
 com.spatial4j.core.shape.Shape getShape()
          Considers SpatialOperation.BBoxWithin in returning the shape.
 void setDistPrecision(Double distPrecision)
           
 void setMax(Double max)
           
 void setMin(Double min)
           
 void setOperation(SpatialOperation operation)
           
 void setShape(com.spatial4j.core.shape.Shape shape)
           
 String toString()
           
 void validate()
          Check if the arguments make sense -- throw an exception if not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DIST_PRECISION

public static final double DEFAULT_DIST_PRECISION
See Also:
Constant Field Values
Constructor Detail

SpatialArgs

public SpatialArgs(SpatialOperation operation)

SpatialArgs

public SpatialArgs(SpatialOperation operation,
                   com.spatial4j.core.shape.Shape shape)
Method Detail

validate

public void validate()
              throws com.spatial4j.core.exception.InvalidSpatialArgument
Check if the arguments make sense -- throw an exception if not

Throws:
com.spatial4j.core.exception.InvalidSpatialArgument

toString

public String toString()
Overrides:
toString in class Object

getOperation

public SpatialOperation getOperation()

setOperation

public void setOperation(SpatialOperation operation)

getShape

public com.spatial4j.core.shape.Shape getShape()
Considers SpatialOperation.BBoxWithin in returning the shape.


setShape

public void setShape(com.spatial4j.core.shape.Shape shape)

getDistPrecision

public Double getDistPrecision()
The fraction of the distance from the center of the query shape to its nearest edge that is considered acceptable error. The algorithm for computing the distance to the nearest edge is actually a little different. It normalizes the shape to a square given it's bounding box area:
sqrt(shape.bbox.area)/2
And the error distance is beyond the shape such that the shape is a minimum shape.


setDistPrecision

public void setDistPrecision(Double distPrecision)

getMin

public Double getMin()

setMin

public void setMin(Double min)

getMax

public Double getMax()

setMax

public void setMax(Double max)


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