Exemplo n.º 1
0
        internal override LayerBuilder getBuilder(DappleModel oModel)
        {
            DapServerModelNode oServerMN = oModel.AddDAPServer(m_oServer as DapServerUri, true, false, false) as DapServerModelNode;

            oServerMN.WaitForLoad();
            if (oServerMN.LoadState == LoadState.LoadFailed)
            {
                return(null);
            }

            Geosoft.GX.DAPGetData.Server oServer = oServerMN.Server;
            return(new DAPBrowserMapBuilder(MainForm.WorldWindowSingleton, oServer, null));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref= "T:DAPImageStore"/> class.
 /// </summary>
 internal DAPImageStore(DataSet oDataSet,
                        Geosoft.GX.DAPGetData.Server server)
 {
     m_oDataSet = oDataSet;
     m_oServer  = server;
 }
Exemplo n.º 3
0
        internal override LayerBuilder getBuilder(DappleModel oModel)
        {
            DataSet hDataSet = new DataSet();

            hDataSet.Name      = getAttribute("datasetname");
            hDataSet.Url       = m_oServer.ToBaseUri();
            hDataSet.Type      = getAttribute("type");
            hDataSet.Title     = getAttribute("title");
            hDataSet.Edition   = getAttribute("edition");
            hDataSet.Hierarchy = getAttribute("hierarchy");

            if (hasAttribute("stylesheet"))
            {
                hDataSet.Stylesheet = getAttribute("stylesheet");
            }

            double minX, minY, maxX, maxY;

            if (!Double.TryParse(getAttribute("west"), NumberStyles.Any, CultureInfo.InvariantCulture, out minX))
            {
                return(null);
            }
            if (!Double.TryParse(getAttribute("south"), NumberStyles.Any, CultureInfo.InvariantCulture, out minY))
            {
                return(null);
            }
            if (!Double.TryParse(getAttribute("east"), NumberStyles.Any, CultureInfo.InvariantCulture, out maxX))
            {
                return(null);
            }
            if (!Double.TryParse(getAttribute("north"), NumberStyles.Any, CultureInfo.InvariantCulture, out maxY))
            {
                return(null);
            }
            hDataSet.Boundary = new Geosoft.Dap.Common.BoundingBox(maxX, maxY, minX, minY);

            int    height, size, levels;
            double lvl0tilesize;

            if (!Int32.TryParse(getAttribute("height"), NumberStyles.Any, CultureInfo.InvariantCulture, out height))
            {
                return(null);
            }
            if (!Int32.TryParse(getAttribute("size"), NumberStyles.Any, CultureInfo.InvariantCulture, out size))
            {
                return(null);
            }
            if (!Int32.TryParse(getAttribute("levels"), NumberStyles.Any, CultureInfo.InvariantCulture, out levels))
            {
                return(null);
            }
            if (!Double.TryParse(getAttribute("lvl0tilesize"), NumberStyles.Any, CultureInfo.InvariantCulture, out lvl0tilesize))
            {
                return(null);
            }

            DapServerModelNode oServerMN = oModel.AddDAPServer(m_oServer as DapServerUri, true, false, false) as DapServerModelNode;

            oServerMN.WaitForLoad();
            if (oServerMN.LoadState == LoadState.LoadFailed)
            {
                return(null);
            }

            Geosoft.GX.DAPGetData.Server oServer = oServerMN.Server;
            return(new DAPQuadLayerBuilder(hDataSet, MainForm.WorldWindowSingleton, oServer, null, height, size, lvl0tilesize, levels));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref= "T:DAPImageStore"/> class.
 /// </summary>
 internal DAPImageStore(DataSet oDataSet,
     Geosoft.GX.DAPGetData.Server server)
 {
     m_oDataSet = oDataSet;
      m_oServer = server;
 }