ResolveDistErr() public méthode

Gets the error distance that specifies how precise the query shape is. This looks at DistErr, DistErrPct, and defaultDistErrPct.
public ResolveDistErr ( SpatialContext ctx, double defaultDistErrPct ) : double
ctx SpatialContext
defaultDistErrPct double 0 to 0.5
Résultat double
        public override Filter MakeFilter(SpatialArgs args)
        {
            SpatialOperation op = args.Operation;
            if (op == SpatialOperation.IsDisjointTo)
            {
                return new DisjointSpatialFilter(this, args, FieldName);
            }
            IShape shape = args.Shape;
            int detailLevel = grid.GetLevelForDistance(args.ResolveDistErr(ctx, distErrPct));

        
            if (pointsOnly || op == SpatialOperation.Intersects)
            {
                return new IntersectsPrefixTreeFilter(
                    shape, FieldName, grid, detailLevel, prefixGridScanLevel, !pointsOnly);
            }
            else if (op == SpatialOperation.IsWithin)
            {
                return new WithinPrefixTreeFilter(
                    shape, FieldName, grid, detailLevel, prefixGridScanLevel, 
                    -1); //-1 flag is slower but ensures correct results
            }
            else if (op == SpatialOperation.Contains)
            {
                return new ContainsPrefixTreeFilter(shape, FieldName, grid, detailLevel, 
                    multiOverlappingIndexedShapes);
            }
            throw new UnsupportedSpatialOperation(op);
        }
		public override Filter MakeFilter(SpatialArgs args)
		{
			var op = args.Operation;
			if (!SpatialOperation.Is(op, SpatialOperation.IsWithin, SpatialOperation.Intersects, SpatialOperation.BBoxWithin, SpatialOperation.BBoxIntersects))
				throw new UnsupportedSpatialOperation(op);

			Shape shape = args.Shape;

			int detailLevel = grid.GetLevelForDistance(args.ResolveDistErr(ctx, distErrPct));

			return new RecursivePrefixTreeFilter(GetFieldName(), grid, shape, prefixGridScanLevel, detailLevel);
		}
        public override Filter MakeFilter(SpatialArgs args)
        {
            SpatialOperation op = args.Operation;
            if (op != SpatialOperation.Intersects)
                throw new UnsupportedSpatialOperation(op);

            Shape shape = args.Shape;
            int detailLevel = grid.GetLevelForDistance(args.ResolveDistErr(ctx, distErrPct));
            var cells = grid.GetNodes(shape, detailLevel, false);
            var filter = new TermsFilter();
            foreach (Node cell in cells)
            {
                filter.AddTerm(new Term(GetFieldName(), cell.GetTokenString()));
            }
            return filter;
        }
 //do not simplify indexed cells
 public override Filter MakeFilter(SpatialArgs args)
 {
     SpatialOperation op = args.Operation;
     if (op != SpatialOperation.Intersects)
     {
         throw new UnsupportedSpatialOperation(op);
     }
     Shape shape = args.Shape;
     int detailLevel = grid.GetLevelForDistance(args.ResolveDistErr(ctx, distErrPct));
     IList<Cell> cells = grid.GetCells(shape, detailLevel, false, true);
     //no parents
     //simplify
     var terms = new BytesRef[cells.Count];
     int i = 0;
     foreach (Cell cell in cells)
     {
         terms[i++] = new BytesRef(cell.TokenString);
     }
     return new TermsFilter(FieldName, terms);
 }