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

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

Introduction

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

Prototype

public Double getDistErrPct() 

Source Link

Document

A measure of acceptable error of the shape as a fraction.

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();
}