public void Should_Give_Subhashes_1() { var hasher = new Geohasher(); var subhashes = hasher.GetSubhashes("u"); Assert.Equal(32, subhashes.Length); }
public void SmallCompressionTest() { var compressor = new GeohashCompressor(); var hasher = new Geohasher(); var list = new List <string>(); list.AddRange(hasher.GetSubhashes("ABC")); list.AddRange(hasher.GetSubhashes("ABF")); list.AddRange(hasher.GetSubhashes("AFF")); list.AddRange(new List <string> { "KK", "F", "FKUVC", "FKUVX" }); var compressed = compressor.Compress(list.ToArray()); Assert.AreEqual(7, compressed.Count); }
public List <string> Subhashes(string geohash) { return(hasher.GetSubhashes(geohash).ToList()); }