org.apache.lucene.spatial.query
Class SpatialArgs
java.lang.Object
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.
DEFAULT_DIST_PRECISION
public static final double DEFAULT_DIST_PRECISION
- See Also:
- Constant Field Values
SpatialArgs
public SpatialArgs(SpatialOperation operation)
SpatialArgs
public SpatialArgs(SpatialOperation operation,
com.spatial4j.core.shape.Shape shape)
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.