Ejemplo n.º 1
0
 public ArcIMSReprojectDownload(ArcIMSServerUri serverUri, int index, GeographicBoundingBox sourceBounds, ArcIMSFeatureCoordSys sourceCoordSys, String serviceName)
     : base(serverUri, index)
 {
     this.sourceBounds   = sourceBounds;
     this.sourceCoordSys = sourceCoordSys;
     this.serviceName    = serviceName;
 }
Ejemplo n.º 2
0
        internal ArcIMSQuadLayerBuilder(ArcIMSServerUri oServerUri, String strServiceName, String szLayerTitle, String szLayerID, GeographicBoundingBox oEnvelope, ArcIMSFeatureCoordSys oProjection, WorldWindow oWorldWindow, IBuilder oParent, double dMinScale, double dMaxScale, CultureInfo oInfo)
            : base(szLayerTitle, oWorldWindow, oParent)
        {
            m_oServerUri           = oServerUri;
            m_oCultureInfo         = oInfo;
            m_oUnprojectedEnvelope = oEnvelope;
            m_oProjection          = oProjection;
            m_szLayerID            = szLayerID;
            m_szServiceName        = strServiceName;
            m_dMinScale            = dMinScale;
            if (m_dMinScale < DefaultMinScale)
            {
                m_dMinScale = DefaultMinScale;
            }
            m_dMaxScale = dMaxScale;
            if (m_dMaxScale > DefaultMaxScale)
            {
                m_dMaxScale = DefaultMaxScale;
            }
            if (m_dMaxScale < m_dMinScale)
            {
                // --- Weird scale values, ignore them and hope for the best ---
                m_dMaxScale = DefaultMaxScale;
                m_dMinScale = DefaultMinScale;
            }

            CalculateLevels();
        }
Ejemplo n.º 3
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));
            }
        }
Ejemplo n.º 4
0
 internal ArcIMSImageStore(String strServiceName, String szLayerID, ArcIMSServerUri oUri, int iTextureSize, CultureInfo oInfo, double minScale, double maxScale)
 {
     m_oUri           = oUri;
     m_strServiceName = strServiceName;
     m_szLayerID      = szLayerID;
     m_iTextureSize   = iTextureSize;
     m_oCultureInfo   = oInfo;
     m_dMinScale      = minScale;
     m_dMaxScale      = maxScale;
 }
Ejemplo n.º 5
0
        internal ArcIMSQuadLayerBuilder(ArcIMSServerUri oServerUri, String strServiceName, String szLayerTitle, String szLayerID, GeographicBoundingBox oEnvelope, ArcIMSFeatureCoordSys oProjection, WorldWindow oWorldWindow, IBuilder oParent, double dMinScale, double dMaxScale, CultureInfo oInfo)
            : base(szLayerTitle, oWorldWindow, oParent)
        {
            m_oServerUri = oServerUri;
            m_oCultureInfo = oInfo;
            m_oUnprojectedEnvelope = oEnvelope;
            m_oProjection = oProjection;
            m_szLayerID = szLayerID;
            m_szServiceName = strServiceName;
            m_dMinScale = dMinScale;
            if (m_dMinScale < DefaultMinScale)
                m_dMinScale = DefaultMinScale;
            m_dMaxScale = dMaxScale;
            if (m_dMaxScale > DefaultMaxScale)
                m_dMaxScale = DefaultMaxScale;
            if (m_dMaxScale < m_dMinScale)
            {
                // --- Weird scale values, ignore them and hope for the best ---
                m_dMaxScale = DefaultMaxScale;
                m_dMinScale = DefaultMinScale;
            }

            CalculateLevels();
        }
Ejemplo n.º 6
0
 internal ArcIMSServiceDownload(ArcIMSServerUri oUri, String serviceName, int iIndexNumber)
     : base(oUri, iIndexNumber)
 {
     m_strServiceName = serviceName;
 }
Ejemplo n.º 7
0
 protected ArcIMSDownload(ArcIMSServerUri oUri, int iIndexNumber)
     : base(oUri.ToBaseUri(), iIndexNumber)
 {
     m_oUri = oUri;
 }
Ejemplo n.º 8
0
 internal ArcIMSImageStore(String strServiceName, String szLayerID, ArcIMSServerUri oUri, int iTextureSize, CultureInfo oInfo, double minScale, double maxScale)
 {
     m_oUri = oUri;
      m_strServiceName = strServiceName;
      m_szLayerID = szLayerID;
      m_iTextureSize = iTextureSize;
     m_oCultureInfo = oInfo;
     m_dMinScale = minScale;
     m_dMaxScale = maxScale;
 }
Ejemplo n.º 9
0
 private static void AddArcIMSServer(XmlDocument doc, ArcIMSServerUri uri)
 {
     XmlElement oWMSRoot = doc.SelectSingleNode("/dappleview/servers/builderentry/builderdirectory[@specialcontainer=\"WMSServers\"]") as XmlElement;
     XmlElement oBuilderEntry = doc.CreateElement("builderentry");
     oWMSRoot.AppendChild(oBuilderEntry);
     XmlElement oDapCatalog = doc.CreateElement("arcimscatalog");
     oDapCatalog.SetAttribute("capabilitiesurl", uri.ToString());
     oDapCatalog.SetAttribute("enabled", "true");
     oBuilderEntry.AppendChild(oDapCatalog);
 }
Ejemplo n.º 10
0
 private static void SetArcIMSServerEnabled(XmlDocument doc, ArcIMSServerUri uri, bool blValue)
 {
     foreach (XmlElement oArcIMSCatalog in doc.SelectNodes("/dappleview/servers/builderentry/builderdirectory/builderentry/arcimscatalog"))
     {
         if (new ArcIMSServerUri(oArcIMSCatalog.GetAttribute("capabilitiesurl")).ToString().Equals(uri.ToString()))
         {
             oArcIMSCatalog.SetAttribute("enabled", blValue.ToString());
         }
     }
 }
Ejemplo n.º 11
0
 private static void RemoveArcIMSServer(XmlDocument doc, ArcIMSServerUri uri)
 {
     foreach (XmlElement oDapCatalog in doc.SelectNodes("/dappleview/servers/builderentry/builderdirectory/builderentry/arcimscatalog"))
     {
         if (new ArcIMSServerUri(oDapCatalog.GetAttribute("capabilitiesurl")).ToString().Equals(uri.ToString()))
         {
             oDapCatalog.ParentNode.ParentNode.RemoveChild(oDapCatalog.ParentNode);
         }
     }
 }
Ejemplo n.º 12
0
        private static bool ContainsArcIMSServer(XmlDocument doc, ArcIMSServerUri uri)
        {
            foreach (XmlAttribute oAttr in doc.SelectNodes("//arcimscatalog/@capabilitiesurl"))
            {
                if (new ArcIMSServerUri(oAttr.Value).ToString().Equals(uri.ToString()))
                {
                    return true;
                }
            }

            return false;
        }
Ejemplo n.º 13
0
 internal ArcIMSServerModelNode(DappleModel oModel, ArcIMSServerUri oUri, bool blEnabled)
     : base(oModel, blEnabled)
 {
     m_oUri = oUri;
 }
Ejemplo n.º 14
0
        internal ArcIMSServerModelNode GetServer(ArcIMSServerUri oUri)
        {
            foreach (ArcIMSServerModelNode oServer in UnfilteredChildren)
            {
                if (oServer.Uri.Equals(oUri))
                {
                    return oServer;
                }
            }

            return null;
        }
Ejemplo n.º 15
0
 internal ArcIMSServerModelNode AddServer(ArcIMSServerUri oUri, bool blEnabled)
 {
     ArcIMSServerModelNode result = new ArcIMSServerModelNode(m_oModel, oUri, blEnabled);
     AddChild(result);
     if (blEnabled)
     {
         result.BeginLoad();
     }
     return result;
 }
Ejemplo n.º 16
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);
            }
        }
Ejemplo n.º 17
0
 internal ArcIMSCatalogDownload(ArcIMSServerUri serverUri, int iIndexNumber)
     : base(serverUri, iIndexNumber)
 {
 }
Ejemplo n.º 18
0
        internal ServerModelNode AddArcIMSServer(ArcIMSServerUri oUri, bool blEnabled, bool blUpdateHomeView, bool blSubmitToDappleSearch)
        {
            lock (m_oLock)
            {
                // --- Don't add the server if it's already in the model ---

                ServerModelNode result = m_oRootNode.ArcIMSServers.GetServer(oUri);
                if (result != null)
                {
                    return result;
                }

                // --- Add the server ---

                result = m_oRootNode.ArcIMSServers.AddServer(oUri, blEnabled);

                // --- Update home view if necessary ---

                if (blUpdateHomeView)
                {
                    result.AddToHomeView();
                }

                // --- Submit to DappleSearch if necessary ---

                if (blSubmitToDappleSearch)
                {
                    SubmitServerToSearchEngine(oUri.ToBaseUri(), ServerModelNode.ServerType.ArcIMS);
                }

                OnServerAdded(EventArgs.Empty);
                return result;
            }
        }
Ejemplo n.º 19
0
 public ArcIMSReprojectDownload(ArcIMSServerUri serverUri, int index, GeographicBoundingBox sourceBounds, ArcIMSFeatureCoordSys sourceCoordSys, String serviceName)
     : base(serverUri, index)
 {
     this.sourceBounds = sourceBounds;
     this.sourceCoordSys = sourceCoordSys;
     this.serviceName = serviceName;
 }
Ejemplo n.º 20
0
 protected ArcIMSDownload(ArcIMSServerUri oUri, int iIndexNumber)
     : base(oUri.ToBaseUri(), iIndexNumber)
 {
     m_oUri = oUri;
 }
Ejemplo n.º 21
0
 internal ArcIMSServiceDownload(ArcIMSServerUri oUri, String serviceName, int iIndexNumber)
     : base(oUri, iIndexNumber)
 {
     m_strServiceName = serviceName;
 }
Ejemplo n.º 22
0
 internal ArcIMSCatalogDownload(ArcIMSServerUri serverUri, int iIndexNumber)
     : base(serverUri, iIndexNumber)
 {
 }