Esempio n. 1
0
        /// <summary>
        /// Gets the sweden extent bounding box polygon.
        /// </summary>
        /// <param name="coordinateSystem">The coordinate system.</param>
        public static WebPolygon GetSwedenExtentBoundingBoxPolygon(WebCoordinateSystem coordinateSystem)
        {
            WebPolygon boundingBox = new WebPolygon();

            // Sweden extent in SWEREF99_TM
            WebBoundingBox swedenBoundingBox = SwedenExtentCoordinates.GetSwedenExtentWebBoundingBoxSweref99();

            if (coordinateSystem.IsNotNull() && coordinateSystem.Id.IsNotNull() &&
                (coordinateSystem.Id != CoordinateSystemId.SWEREF99_TM))
            {
                WebCoordinateSystem sweref99CoordinateSystem = new WebCoordinateSystem();
                sweref99CoordinateSystem.Id = CoordinateSystemId.SWEREF99_TM;
                boundingBox = WebServiceData.CoordinateConversionManager.GetConvertedBoundingBox(
                    swedenBoundingBox, sweref99CoordinateSystem, coordinateSystem);
            }
            else
            {
                boundingBox = swedenBoundingBox.GetPolygon();
            }

            return(boundingBox);
        }