csCommon.Plugins.MgrsGrid.GeographicBoundingBox.Create C# (CSharp) Method

Create() public static method

public static Create ( WGS84LatLongPoint pUpperLeft, WGS84LatLongPoint pLowerRight ) : GeographicBoundingBox
pUpperLeft WGS84LatLongPoint
pLowerRight WGS84LatLongPoint
return GeographicBoundingBox
        public static GeographicBoundingBox Create(WGS84LatLongPoint pUpperLeft, WGS84LatLongPoint pLowerRight)
        {
            // switch east and west, because the bounding box is positioned around the 180 degree meridian
            return new GeographicBoundingBox()
            {
                NorthBoundLatitude = Math.Max(pUpperLeft.Latitude, pLowerRight.Latitude),
                WestBoundLongitude = Math.Min(pUpperLeft.Longitude, pLowerRight.Longitude),
                SouthBoundLatitude = Math.Min(pUpperLeft.Latitude, pLowerRight.Latitude),
                EastBoundLongitude = Math.Max(pUpperLeft.Longitude, pLowerRight.Longitude)
            };

        }
GeographicBoundingBox