Example usage for org.apache.lucene.spatial.query SpatialArgs getDistErr

List of usage examples for org.apache.lucene.spatial.query SpatialArgs getDistErr

Introduction

In this page you can find the example usage for org.apache.lucene.spatial.query SpatialArgs getDistErr.

Prototype

public Double getDistErr() 

Source Link

Document

The acceptable error of the shape.

Usage

From source file:org.apache.blur.analysis.type.spatial.SpatialArgsParser.java

License:Apache License

/** Writes a close approximation to the parsed input format. */
public static String writeSpatialArgs(SpatialArgs args, ShapeReadWriter<SpatialContext> shapeReadWriter) {
    StringBuilder str = new StringBuilder();
    str.append(args.getOperation().getName());
    str.append('(');
    str.append(shapeReadWriter.writeShape(args.getShape()));
    if (args.getDistErrPct() != null)
        str.append(" distErrPct=").append(String.format(Locale.ROOT, "%.2f%%", args.getDistErrPct() * 100d));
    if (args.getDistErr() != null)
        str.append(" distErr=").append(args.getDistErr());
    str.append(')');
    return str.toString();
}