示例#1
0
        public GeographicBoundingBox ReprojectToWGS84(ArcIMSServerUri uri, String serviceName, GeographicBoundingBox source)
        {
            if (IsWGS84)
            {
                return(source);
            }

            if (!defined)
            {
                return(new GeographicBoundingBox(89.1, -89.1, -180, 180));
            }

            if (source == null)
            {
                return(new GeographicBoundingBox(89.2, -89.2, -180, 180));
            }

            ArcIMSReprojectDownload download = new ArcIMSReprojectDownload(uri, 0, source, this, serviceName);

            try
            {
                download.DownloadMemory();
                XmlDocument response = new XmlDocument();
                response.Load(download.ContentStream);
                return(ProcessResponse(response));
            }
            catch (Exception)
            {
                return(new GeographicBoundingBox(89.3, -89.3, -180, 180));
            }
        }
        public GeographicBoundingBox ReprojectToWGS84(ArcIMSServerUri uri, String serviceName, GeographicBoundingBox source)
        {
            if (IsWGS84)
                return source;

            if (!defined)
                return new GeographicBoundingBox(89.1, -89.1, -180, 180);

            if (source == null)
                return new GeographicBoundingBox(89.2, -89.2, -180, 180);

            ArcIMSReprojectDownload download = new ArcIMSReprojectDownload(uri, 0, source, this, serviceName);
            try
            {
                download.DownloadMemory();
                XmlDocument response = new XmlDocument();
                response.Load(download.ContentStream);
                return ProcessResponse(response);
            }
            catch (Exception)
            {
                return new GeographicBoundingBox(89.3, -89.3, -180, 180);
            }
        }