MapSuiteGisEditor/WpfDesktopExtension/Shares/GeoData/ShapeFileBoundingBox.cs
/// <summary>
/// merge the input Bounding Box, store the result
/// </summary>
/// <param name="targetBox">the input BoundingBox to be merged</param>
merge the input Bounding Box, store the result
merge the input Bounding Box store the result
public void MergeBoundingBox(ShapeFileBoundingBox targetBox)
        {
            if (minX == 0 && minY == 0 && maxX == 0 && maxY == 0)
            {
                minX = targetBox.minX;
                maxX = targetBox.maxX;
                minY = targetBox.minY;
                maxY = targetBox.maxY;
            }
            else
            {
                minX = targetBox.MinX < minX ? targetBox.MinX : minX;
                maxX = targetBox.MaxX > maxX ? targetBox.MaxX : maxX;
                minY = targetBox.MinY < minY ? targetBox.MinY : minY;
                maxY = targetBox.MaxY > maxY ? targetBox.MaxY : maxY;
            }
        }
public void MergeBoundingBox ( ShapeFileBoundingBox targetBox ) { if ( minX == 0 && minY == 0 && maxX == 0 && maxY == 0 ) { minX = targetBox . minX ; maxX = targetBox . maxX ; minY = targetBox . minY ; maxY = targetBox . maxY ; } else { minX = targetBox . MinX < minX ? targetBox . MinX : minX ; maxX = targetBox . MaxX > maxX ? targetBox . MaxX : maxX ; minY = targetBox . MinY < minY ? targetBox . MinY : minY ; maxY = targetBox . MaxY > maxY ? targetBox . MaxY : maxY ; } }
merge the input Bounding Box, store the result
merge the input Bounding Box store the result
targetBox
ShapeFileBoundingBox
the input BoundingBox to be merged
the input BoundingBox to be merged