/// <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>IPolygon with coordinates according to toCoordinateSystem</returns> public virtual Polygon GetConvertedBoundingBox(IBoundingBox boundingBox, ICoordinateSystem fromCoordinateSystem, ICoordinateSystem toCoordinateSystem) { Polygon toPolygon; toPolygon = null; if (boundingBox.IsNotNull()) { toPolygon = boundingBox.GetPolygon(); toPolygon = GetConvertedPolygon(toPolygon, fromCoordinateSystem, toCoordinateSystem); } return(toPolygon); }