コード例 #1
0
        /// <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;
        }
コード例 #2
0
 public BoundingBoxGeoHashIterator(TwoGeoHashBoundingBox bbox)
 {
     m_boundingBoxRenamed = bbox;
     m_current            = bbox.BottomLeft;
 }
コード例 #3
0
 public BoundingBoxSampler(TwoGeoHashBoundingBox bbox, int seed) : this(bbox)
 {
     m_rand = new Random(seed);
 }