Relatude Help

A widening search

// The nearest venues: widen the radius until enough are found
IEnumerable<IVenue> FindNearest(NodeStore db, GeoCoordinate center, int wanted = 10) {
    ResultSet<IVenue> hits = null!;
    foreach (var radius in new[] { 1_000d, 5_000, 25_000, 100_000, 500_000 }) {
        hits = db.Query<IVenue>()
                 .Where(v => v.Location.IsWithin(center, radius))
                 .OrderBy(v => v.Location.DistanceTo(center))
                 .Take(wanted)
                 .Execute();
        if (hits.Count == wanted) break;
    }
    return hits;
}