|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.spatial.query.SpatialArgs
public class SpatialArgs
Principally holds the query Shape and the SpatialOperation.
It's used as an argument to some methods on SpatialStrategy.
| Field Summary | |
|---|---|
static double |
DEFAULT_DISTERRPCT
|
| Constructor Summary | |
|---|---|
SpatialArgs(SpatialOperation operation,
com.spatial4j.core.shape.Shape shape)
|
|
| Method Summary | |
|---|---|
static double |
calcDistanceFromErrPct(com.spatial4j.core.shape.Shape shape,
double distErrPct,
com.spatial4j.core.context.SpatialContext ctx)
Computes the distance given a shape and the distErrPct. |
Double |
getDistErr()
The acceptable error of the shape. |
Double |
getDistErrPct()
A measure of acceptable error of the shape as a fraction. |
SpatialOperation |
getOperation()
|
com.spatial4j.core.shape.Shape |
getShape()
|
double |
resolveDistErr(com.spatial4j.core.context.SpatialContext ctx,
double defaultDistErrPct)
Gets the error distance that specifies how precise the query shape is. |
void |
setDistErr(Double distErr)
|
void |
setDistErrPct(Double distErrPct)
|
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 |
|---|
public static final double DEFAULT_DISTERRPCT
| Constructor Detail |
|---|
public SpatialArgs(SpatialOperation operation,
com.spatial4j.core.shape.Shape shape)
| Method Detail |
|---|
public static double calcDistanceFromErrPct(com.spatial4j.core.shape.Shape shape,
double distErrPct,
com.spatial4j.core.context.SpatialContext ctx)
distErrPct. The
algorithm is the fraction of the distance from the center of the query
shape to its closest bounding box corner.
shape - Mandatory.distErrPct - 0 to 0.5ctx - Mandatory
public double resolveDistErr(com.spatial4j.core.context.SpatialContext ctx,
double defaultDistErrPct)
getDistErr(), getDistErrPct(), and defaultDistErrPct.
defaultDistErrPct - 0 to 0.5
public void validate()
throws IllegalArgumentException
IllegalArgumentExceptionpublic String toString()
toString in class Objectpublic SpatialOperation getOperation()
public void setOperation(SpatialOperation operation)
public com.spatial4j.core.shape.Shape getShape()
public void setShape(com.spatial4j.core.shape.Shape shape)
public Double getDistErrPct()
calcDistanceFromErrPct(com.spatial4j.core.shape.Shape, double,
com.spatial4j.core.context.SpatialContext)public void setDistErrPct(Double distErrPct)
public Double getDistErr()
public void setDistErr(Double distErr)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||