/// <summary>
        /// Adjusts the boundingbox to equal proportions
        /// </summary>
        /// <param name="bbox">The actual bounding box</param>
        /// <param name="scale">The scale to fit</param>
        /// <param name="size">The size to fit to</param>
        /// <returns>A bounding box with the correct ratio</returns>
        public ObjCommon.IEnvelope AdjustBoundingBox(ObjCommon.IEnvelope bbox, double scale, System.Drawing.Size size)
        {
            Check.ArgumentNotNull(bbox, nameof(bbox));
            var env = AdjustBoundingBox(new Envelope(bbox.MinX, bbox.MaxX, bbox.MinY, bbox.MaxY), scale, size);

            return(ObjectFactory.CreateEnvelope(env.MinX, env.MinY, env.MaxX, env.MaxY));
        }
 /// <summary>
 /// Calculates the scale of the map, given the bounding box and image size
 /// </summary>
 /// <param name="bbox">The map bounding box</param>
 /// <param name="size">The size of the image</param>
 /// <returns>The scale</returns>
 public double CalculateScale(ObjCommon.IEnvelope bbox, System.Drawing.Size size)
 {
     Check.ArgumentNotNull(bbox, nameof(bbox));
     return(CalculateScale(new Envelope(bbox.MinX, bbox.MaxX, bbox.MinY, bbox.MaxY), size));
 }