Example #1
0
        /// <summary>
        /// Returns the bounding box of the object
        /// </summary>
        /// <returns>bounding box</returns>
        public override BoundingBox GetBoundingBox()
        {
            if (_Polygons == null || _Polygons.Count == 0)
            {
                return(null);
            }
            BoundingBox bbox = Polygons[0].GetBoundingBox();

            for (int i = 1; i < Polygons.Count; i++)
            {
                bbox = bbox.Join(Polygons[i].GetBoundingBox());
            }
            return(bbox);
        }
Example #2
0
        /// <summary>
        /// The minimum bounding box for this Geometry.
        /// </summary>
        /// <returns></returns>
        public override BoundingBox GetBoundingBox()
        {
            if (_LineStrings == null || _LineStrings.Count == 0)
            {
                return(null);
            }
            BoundingBox bbox = _LineStrings[0].GetBoundingBox();

            for (int i = 1; i < _LineStrings.Count; i++)
            {
                bbox = bbox.Join(_LineStrings[i].GetBoundingBox());
            }
            return(bbox);
        }