VelocityDB.geohash.query.GeoHashBoundingBoxQuery.GeoHashBoundingBoxQuery C# (CSharp) Method

GeoHashBoundingBoxQuery() public method

public GeoHashBoundingBoxQuery ( BoundingBox bbox ) : System
bbox BoundingBox
return System
    public GeoHashBoundingBoxQuery(BoundingBox bbox)
    {
      int fittingBits = GeoHashSizeTable.NumberOfBitsForOverlappingGeoHash(bbox);
      WGS84Point center = bbox.CenterPoint;
      GeoHash centerHash = GeoHash.WithBitPrecision(center.Latitude, center.Longitude, fittingBits);

      if (HashFits(centerHash, bbox))
      {
        AddSearchHash(centerHash);
      }
      else
      {
        ExpandSearch(centerHash, bbox);
      }
    }