/// <summary>
        /// Convert bounding box from one coordinate system to
        /// another coordinate system.
        /// Converted bounding box is returned as a polygon
        /// since it probably is not a rectangle any more.
        /// </summary>
        /// <param name="boundingBox">Bounding box that should be converted.</param>
        /// <param name="fromCoordinateSystem">From coordinate system.</param>
        /// <param name="toCoordinateSystem">To coordinate system.</param>
        /// <returns>Polygon with coordinates according to toCoordinateSystem</returns>
        public virtual WebPolygon GetConvertedBoundingBox(WebBoundingBox boundingBox,
                                                          WebCoordinateSystem fromCoordinateSystem,
                                                          WebCoordinateSystem toCoordinateSystem)
        {
            WebPolygon toPolygon;

            toPolygon = null;
            if (boundingBox.IsNotNull())
            {
                toPolygon = boundingBox.GetPolygon();
                toPolygon = GetConvertedPolygon(toPolygon,
                                                fromCoordinateSystem,
                                                toCoordinateSystem);
            }

            return(toPolygon);
        }