Пример #1
0
        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);
            }
        }
Пример #2
0
 public GeocodeMatrix Add(string c)
 {
     neighbours[index++] = new Geocode()
     {
         Code = c
     };
     return(this);
 }
Пример #3
0
 public bool Exists(Geocode code) => codes.Exists(code);
Пример #4
0
 public void Add(Geocode code) => codes.Add(code);
Пример #5
0
 public bool Exists(Geocode geoCode) => codes.Exists(geoCode);
Пример #6
0
 private static Geocode adjacent(Geocode geoCode, Direction d)
 {
     return(Geocode.None);
 }