public void Compute(string code) { if (code.Length == 7) //7 = 192 meter accuracy geohashes generation { var geo = new Geocode() { Code = code }; if (!store.Exists(geo)) { store.Add(geo); Log($"Added {code}"); } else { Log($"Exists {code}"); } return; } foreach (var s in suffix()) { Compute(code + s); } }
public GeocodeMatrix Add(string c) { neighbours[index++] = new Geocode() { Code = c }; return(this); }
public bool Exists(Geocode code) => codes.Exists(code);
public void Add(Geocode code) => codes.Add(code);
public bool Exists(Geocode geoCode) => codes.Exists(geoCode);
private static Geocode adjacent(Geocode geoCode, Direction d) { return(Geocode.None); }