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