Пример #1
0
        public override void Load()
        {
            return;

            string strCachePath = GetCachePath();

            if (m_oImageTileService == null && m_strDataSetName != string.Empty && m_strServerUrl != string.Empty)
            {
                m_oImageTileService = new ImageTileService(m_strDataSetName, m_strServerUrl);
            }
            m_oImageAccessor = new ImageAccessor(strCachePath,
                                                 m_intTextureSizePixels,
                                                 m_decLevelZeroTileSizeDegrees,
                                                 m_intNumberLevels,
                                                 m_strImageFileExtension,
                                                 strCachePath,
                                                 m_oImageTileService);

            m_oQuadTileSet = new QuadTileSet(m_strName,
                                             m_hBoundary,
                                             m_oWorld,
                                             distAboveSurface,
                                             (terrainMapped ? m_oWorld.TerrainAccessor : null),
                                             m_oImageAccessor, m_bOpacity, false);

            base.Load();
        }
Пример #2
0
        private void butNext_Click(object sender, EventArgs e)
        {
            if (ValidateChildren(ValidationConstraints.Enabled) && Validate())
            {
                // if there are screens to go to....
                if (butNext.Text.StartsWith("&N"))
                {
                    tabCtl.TabPages.Clear();
                    tabCtl.TabPages.Add(m_tabPages[m_intCurrentTab]);
                }
                // otherwise
                else
                {
                    // Make result available and close
                    if (m_intCurrentTab == 3)
                    {
                        m_oServer     = null;
                        m_oTileServer = null;
                        m_WmsURL      = txtWmsServeURL.Text;
                    }
                    else if (m_intCurrentTab == 2)
                    {
                        //DAP
                        m_oTileServer = null;
                        m_WmsURL      = "";
                    }
                    else if (m_intCurrentTab == 1)
                    {
                        m_oServer = null;
                        m_WmsURL  = "";

                        string           cacheDir         = System.IO.Path.Combine(m_worldWind.WorldWindSettings.CachePath, txtName.Text);
                        ImageTileService imageTileService = new ImageTileService(txtDatabaseName.Text, txtServerURL.Text, txtServerURL.Text);

                        GeographicBoundingBox geoBox = new GeographicBoundingBox(
                            Math.Round(Convert.ToDouble(numN.Value), 0),
                            Math.Round(Convert.ToDouble(numS.Value), 0),
                            Math.Round(Convert.ToDouble(numW.Value), 0),
                            Math.Round(Convert.ToDouble(numE.Value), 0));
                        m_oTileServer = new LayerGeneration.QuadLayerBuilder(
                            txtName.Text,
                            Convert.ToInt32(numHeight.Value),
                            chkTileServerUseTerrainMap.Checked,
                            geoBox, numTileSize.Value, Convert.ToInt32(numLevels.Value), Convert.ToInt32(numImagePixelSize.Value),
                            imageTileService, cmbTileServerFileExtension.Text, Convert.ToByte(chkShowOnAdd.Checked ? 255 : 0),
                            m_worldWind.CurrentWorld, m_worldWind.WorldWindSettings.CachePath, m_worldWind.WorldWindSettings.CachePath, m_oParent);
                    }

                    Close();
                }
            }
            // Change next to finish for those screens that end the wizard
            if (m_intCurrentTab != 0)
            {
                butNext.Text = "&OK";
            }
        }
Пример #3
0
        public AeroSceneryManager()
        {
            downloadManager   = new DownloadManager();
            geoConvertManager = new GeoConvertManager();
            imageTileService  = new ImageTileService();
            tileStitcher      = new TileStitcher();
            settingsService   = new SettingsService();
            gridSquareMapper  = new GridSquareMapper();
            afsFileGenerator  = new AFSFileGenerator();
            dataRepository    = new SqlLiteDataRepository();

            imageTiles         = null;
            version            = "1.0.1";
            incrementalVersion = 9;
        }
Пример #4
0
        public AeroSceneryManager()
        {
            bingOrthophotoSource   = new BingOrthophotoSource();
            googleOrthophotoSource = new GoogleOrthophotoSource();
            usgsOrthophotoSource   = new USGSOrthophotoSource();

            downloadManager   = new DownloadManager();
            geoConvertManager = new GeoConvertManager();
            imageTileService  = new ImageTileService();
            tileStitcher      = new TileStitcher();
            settingsService   = new SettingsService();
            gridSquareMapper  = new GridSquareMapper();
            afsFileGenerator  = new AFSFileGenerator();
            dataRepository    = new SqlLiteDataRepository();

            imageTiles         = null;
            version            = "1.0";
            incrementalVersion = 8;
        }
Пример #5
0
        public override void Load()
        {
            string name        = "Geocover 1990";
            string description = "NASA derived global 30 meters per pixel satellite image mosaic";

            //////////////////////////---------------
            double north = 90.0;
            double south = -90.0;
            double west  = -180.0;
            double east  = 180.0;
            GeographicBoundingBox box = new GeographicBoundingBox(north, south, west, east);
            ///////////////////////////---------------------
            string           m_strDataSetName    = "bmng.topo.bathy.200403";
            string           m_strServerUrl      = "http://worldwind25.arc.nasa.gov/tile/tile.aspx";
            ImageTileService m_oImageTileService = new ImageTileService(m_strDataSetName, m_strServerUrl);
            //////////////////////////-------------------------------

            decimal m_decLevelZeroTileSizeDegrees = 36.0m;
            int     m_intNumberLevels             = 20;
            int     m_intTextureSizePixels        = 256;
            string  m_strImageFileExtension       = "jpg";

            string strCachePath = @"E:\项目\智岩切片工具\分块数据\DomTile";// Config.EarthSetting.CachePath + "\\bmng\\";

            ImageAccessor m_oImageAccessor = new ImageAccessor(strCachePath,
                                                               m_intTextureSizePixels,
                                                               m_decLevelZeroTileSizeDegrees,
                                                               m_intNumberLevels,
                                                               m_strImageFileExtension,
                                                               strCachePath,
                                                               m_oImageTileService);

            QuadTileSet tile = new QuadTileSet(name, box, this.Viewer.CurrentWorld, 0,
                                               this.Viewer.CurrentWorld.TerrainAccessor, m_oImageAccessor, m_bOpacity, true);

            tile.IsVisible = true;
            this.Viewer.CurrentWorld.RenderLayerList.Add(tile);
        }