Ported to C# from Java by Mats Persson, VelocityDB, Inc. original Java code: Created by IntelliJ IDEA. User: kevin Date: Jan 17, 2011 Time: 12:03:47 PM
 /// <param name="bbox"> </param>
 /// <exception cref="IllegalArgumentException">
 ///             if the number of geohashes contained in the bounding box
 ///             exceeds Integer.MAX_VALUE </exception>
 public BoundingBoxSampler(TwoGeoHashBoundingBox bbox)
 {
   m_boundingBox = bbox;
   Int64 maxSamplesLong = GeoHash.StepsBetween(bbox.BottomLeft, bbox.TopRight);
   if (maxSamplesLong > int.MaxValue)
   {
     throw new System.ArgumentException("This bounding box is too big too sample using this algorithm");
   }
   m_maxSamples = (int) maxSamplesLong;
 }
 public BoundingBoxGeoHashIterator(TwoGeoHashBoundingBox bbox)
 {
     m_boundingBoxRenamed = bbox;
     m_current            = bbox.BottomLeft;
 }
Example #3
0
 public BoundingBoxSampler(TwoGeoHashBoundingBox bbox, int seed) : this(bbox)
 {
     m_rand = new Random(seed);
 }
 public BoundingBoxSampler(TwoGeoHashBoundingBox bbox, int seed) : this(bbox)
 {
   m_rand = new Random(seed);
 }