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, returned as a BoundingBox.
        /// </summary>
        /// <returns></returns>
        public override BoundingBox GetBoundingBox()
        {
            if (Collection.Count == 0)
            {
                return(null);
            }
            BoundingBox b = this[0].GetBoundingBox();

            foreach (Geometry geometry in Collection)
            {
                b = b.Join(geometry.GetBoundingBox());
            }
            return(b);
        }
Example #3
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);
        }