18 using Lucene.Net.Search;
19 using Spatial4n.Core.Context;
20 using Spatial4n.Core.Distance;
21 using Spatial4n.Core.Shapes;
23 namespace Lucene.Net.Spatial.BBox
31 private readonly Point queryPoint;
32 private readonly DistanceCalculator distCalc;
33 private readonly
double nullValue;
37 this.queryPoint = queryPoint;
38 this.distCalc = ctx.GetDistCalc();
39 this.nullValue = (ctx.IsGeo() ? 180 :
double.MaxValue);
45 if (indexRect == null)
51 score = distCalc.Distance(queryPoint, indexRect.GetCenter());
55 exp.
Value = (float) score;