private void button1_Click(object sender, System.EventArgs e)
        {
            MainApplication mainApp = (MainApplication)this.Owner;
            string          URL     = MainApplication.CreditsWebsiteUrl;

            mainApp.BrowseTo(URL);
//		MainApplication.BrowseTo( MainApplication.CreditsWebsiteUrl );
        }
Beispiel #2
0
        /// <summary>
        /// Constructor for the file loader GUI
        /// </summary>
        /// <param name="app"></param>
        public FileLoader(string fileName, MainApplication app)
        {
            this.mainapp = app;

            InitializeComponent();

            tbFileName.Text = fileName;
        }
        private void pictureBox_Click(object sender, System.EventArgs e)
        {
            MainApplication mainApp = (MainApplication)this.Owner;
            string          URL     = MainApplication.WebsiteUrl;

            mainApp.BrowseTo(URL);
            //MainApplication.BrowseTo( MainApplication.WebsiteUrl );
        }
Beispiel #4
0
		public Clock(MainApplication app) : base("Clock", Vector3.Empty, Quaternion.Identity)
		{
			this.ww = app;
			
			// We want to be drawn on top of everything else
			this.RenderPriority = RenderPriority.Icons;

			// true to make this layer active on startup, this is equal to the checked state in layer manager
			this.IsOn = true;
		}
Beispiel #5
0
        void myBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e)
        {
            String URL = e.Url.ToString();

            if (URL.Contains("about:blank") == false)
            {
                MainApplication nt = (MainApplication)this.FindForm().Owner;
                nt.BrowseTo(URL);

                e.Cancel = true;
            }
        }
Beispiel #6
0
        public FileLoader(MainApplication app)
        {
            this.mainapp = app;

            InitializeComponent();
        }
 public VeReprojectTilesLayer(string name, MainApplication parentApplication, VirtualEarthForm veForm)
     : base(name)
 {
     this.name = name;
     this.parentApplication = parentApplication;
     this.veForm = veForm;
     ServerLogoFilePath = Path.Combine(
                 Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath),
                 ServerLogoFilePath);
 }
Beispiel #8
0
        public GeoportailForm(MainApplication parentApplication)
        {
            InitializeComponent();

            checkBoxIsOn.Checked = true;

            try {
                m_WorldWindow = parentApplication.WorldWindow;

                //Set the PROJ_LIB env var

                //Initialize the metadata for territories
                TerritoryMetadata metadata = new TerritoryMetadata(parentApplication);

                //Create the GeoTilesLayer
                geoTilesLayer = new GeoportailTilesLayer("Geoportail Tiles",metadata, parentApplication, this);
                geoTilesLayer.IsOn = true;

                //Initialize the territories to display initially
                InitLayerState();

                lock(m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.SyncRoot) {
                    foreach(WorldWind.Renderable.RenderableObject ro in m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects) {
                        if(ro is WorldWind.Renderable.RenderableObjectList && ro.Name.IndexOf("Images") >= 0) {
                            WorldWind.Renderable.RenderableObjectList imagesList = ro as WorldWind.Renderable.RenderableObjectList;
                            //insert it at the end of the list
                            imagesList.ChildObjects.Insert(imagesList.ChildObjects.Count - 1, geoTilesLayer);
                            break;
                        }
                    }
                }

                cacheDirectory = String.Format("{0}\\Geoportail", m_WorldWindow.Cache.CacheDirectory);
                if(Directory.Exists(cacheDirectory) == true) {
                    DirectoryInfo diCache = new DirectoryInfo(cacheDirectory);
                    //for debug, delete the entire cache
                    //diCache.Delete(true);
                }

                //check that proj.dll is installed correctly, else set plugin to off
                string projDllPath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\proj.dll";
                if(! File.Exists(projDllPath)) {
                    //TODO turned off for debugging
                    geoTilesLayer.IsOn = false;
                    throw new Exception("'proj.dll' needs to be in the same directory where WorldWind.exe is installed");
                }

            }
            catch(Exception ex) {
                Utility.Log.Write(ex);
                throw;
            }
        }
        public VirtualEarthForm(MainApplication parentApplication)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            try
            {
                m_WorldWindow = parentApplication.WorldWindow;

                veLayer = new VeReprojectTilesLayer("VirtualEarth Tiles", parentApplication, this);

                lock (m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.SyncRoot)
                {
                    foreach (WorldWind.Renderable.RenderableObject ro in m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects)
                    {
                        if (ro is WorldWind.Renderable.RenderableObjectList && ro.Name.IndexOf("Images") >= 0)
                        {
                            WorldWind.Renderable.RenderableObjectList imagesList = ro as WorldWind.Renderable.RenderableObjectList;
                            //imagesList.ChildObjects.Insert(0, m_RenderableList);
                            //insert it at the end of the list
                            imagesList.ChildObjects.Insert(imagesList.ChildObjects.Count - 1, veLayer);
                            break;
                        }
                    }
                }

                cacheDirectory = String.Format("{0}\\Virtual Earth", m_WorldWindow.Cache.CacheDirectory);
                if (Directory.Exists(cacheDirectory) == true)
                {
                    DirectoryInfo diCache = new DirectoryInfo(cacheDirectory);
                    //for debug, delete the entire cache
                    //diCache.Delete(true);
                }

                //#if DEBUG
                pushPinTexture = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\VirtualEarth\\VirtualEarthPushPin.png";
                //#else
                //				pushPinTexture = VirtualEarthPlugin.PluginDir + @"\VirtualEarthPushPin.png";
                //#endif
                if (File.Exists(pushPinTexture) == false)
                {
                    Utility.Log.Write(new Exception("pushPinTexture not found " + pushPinTexture));
                }

                //check that proj.dll is installed correctly, else set plugin to off
                string projDllPath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\proj.dll";
                if (File.Exists(projDllPath) == false)
                {
                    //TODO turned off for debugging
                    veLayer.IsOn = false;
                    throw new Exception("'proj.dll' needs to be in the same directory where WorldWind.exe is installed");
                }

                //Load up settings if they exist
                string settingspath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\VirtualEarth\\Settings.xml";
                if (File.Exists(settingspath))
                    settings = VESettings.LoadSettingsFromFile(settingspath);
                else
                    VESettings.SaveSettingsToFile(settingspath, settings);

                //Apply loaded settings
                tbZoomLevel.Value = settings.ZoomLevel;
                cbLayerIsOn.Checked = settings.LayerOn;
                //cbTerrain.Checked = settings.Terrain;
                rbRoad.Checked = settings.Road;
                rbAerial.Checked = settings.Aerial;
                rbHybrid.Checked = settings.Hybrid;
                rbDebug.Checked = settings.Debug;
            }
            catch (Exception ex)
            {
                Utility.Log.Write(ex);
                throw;
            }
        }
Beispiel #10
0
        public TerritoryMetadata(MainApplication application)
        {
            tmd = new Hashtable();

            //Lambert2e projection
            Proj lambert2e = new Proj(new string[]{"proj=lcc","towgs84=-168,-60,320,0,0,0,0","a=6378249.1449999996","es=0.0068035113","f=293.4650000000","lat_0=46.80000","lat_1=45.8989194400","lat_2=47.6960138900","lon_0=2.3372291670","x_0=600000","y_0=2200000", "no.defs"});

            //Harcode the metadata but it could also be gotten dynamically through calls to a geoportail service
            //May be done in later versions

            //Metr france
            GeoportailTerritory metr = new GeoportailTerritory("metr",1500,1000000);
            tmd[metr.Name] = metr;
            GeoportailLayer layer = new GeoportailLayer("bdortho",lambert2e, new Extent(new UV(45000,2700000),new UV(1200000,1616000)) , new UV(0.5,0.5), 2310000, 2168000,"/c/dmybdobr.jp2,/c/dmybdotl2.jp2");
            metr.AddLayer(layer);

            //Add the components of the layer. Pain in the ass...
            GeoportailLayerComponent component;
            component = new GeoportailLayerComponent(layer,"/c/10.ecw",new Extent(245000, 2600000, 345000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/11.ecw",new Extent(345000, 1800000, 445000, 1700000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/12.ecw",new Extent(345000, 1900000, 445000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/13.ecw",new Extent(345000, 2000000, 445000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/14.ecw",new Extent(345000, 2100000, 445000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/15.ecw",new Extent(345000, 2200000, 445000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/16.ecw",new Extent(345000, 2300000, 445000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/17.ecw",new Extent(345000, 2400000, 445000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/18.ecw",new Extent(345000, 2500000, 445000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/19.ecw",new Extent(345000, 2600000, 445000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/1a.ecw",new Extent(445000, 1800000, 545000, 1700000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/1b.ecw",new Extent(445000, 1900000, 545000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/1c.ecw" ,new Extent(445000, 2000000, 545000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/1d.ecw",new Extent(445000, 2100000, 545000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/2.ecw",new Extent(45000, 2400000, 145000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/3.ecw",new Extent(45000, 2500000, 145000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/4.ecw",new Extent(145000, 2200000, 245000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer, "/c/5.ecw",new Extent(145000, 2300000, 245000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/6.ecw",new Extent(145000, 2400000, 245000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/7.ecw",new Extent(145000, 2500000, 245000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/8.ecw",new Extent(245000, 1800000, 345000, 1700000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/9.ecw",new Extent(245000, 1900000, 345000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/a.ecw",new Extent(245000, 2000000, 345000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/b.ecw",new Extent(245000, 2100000, 345000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/c.ecw",new Extent(245000, 2200000, 345000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/d.ecw",new Extent(245000, 2300000, 345000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/e.ecw",new Extent(245000, 2400000, 345000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/f.ecw",new Extent(245000, 2500000, 345000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/1e.ecw",new Extent(445000, 2200000, 545000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/1f.ecw",new Extent(445000, 2300000, 545000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/20.ecw",new Extent(445000, 2400000, 545000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/21.ecw",new Extent(445000, 2500000, 545000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/22.ecw",new Extent(445000, 2600000, 545000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/23.ecw",new Extent(445000, 2700000, 545000, 2600000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/24.ecw",new Extent(545000, 1800000, 645000, 1700000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/25.ecw",new Extent(545000, 1900000, 645000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/26.ecw",new Extent(545000, 2000000, 645000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/27.ecw",new Extent(545000, 2100000, 645000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/28.ecw",new Extent(545000, 2200000, 645000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/29.ecw",new Extent(545000, 2300000, 645000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/2a.ecw",new Extent(545000, 2400000, 645000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/2b.ecw",new Extent(545000, 2500000, 645000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/2c.ecw",new Extent(545000, 2600000, 645000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/2d.ecw",new Extent(545000, 2700000, 645000, 2600000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/2e.ecw",new Extent(645000, 1800000, 745000, 1700000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/2f.ecw",new Extent(645000, 1900000, 745000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/30.ecw",new Extent(645000, 2000000, 745000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/31.ecw",new Extent(645000, 2100000, 745000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/32.ecw",new Extent(645000, 2200000, 745000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/33.ecw",new Extent(645000, 2300000, 745000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/34.ecw",new Extent(645000, 2400000, 745000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/35.ecw",new Extent(645000, 2500000, 745000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/d/36.ecw",new Extent(645000, 2600000, 745000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/37.ecw",new Extent(645000, 2700000, 745000, 2600000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/38.ecw",new Extent(745000, 1900000, 845000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/39.ecw",new Extent(745000, 2000000, 845000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/3a.ecw",new Extent(745000, 2100000, 845000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/3b.ecw",new Extent(745000, 2200000, 845000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/3c.ecw",new Extent(745000, 2300000, 845000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/3d.ecw",new Extent(745000, 2400000, 845000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/3e.ecw",new Extent(745000, 2500000, 845000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/3f.ecw",new Extent(745000, 2600000, 845000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/40.ecw",new Extent(845000, 1800000, 945000, 1700000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/41.ecw",new Extent(845000, 1900000, 945000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/42.ecw",new Extent(845000, 2000000, 945000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/43.ecw",new Extent(845000, 2100000, 945000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/44.ecw",new Extent(845000, 2200000, 945000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/45.ecw",new Extent(845000, 2300000, 945000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/46.ecw",new Extent(845000, 2400000, 945000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/47.ecw",new Extent(845000, 2500000, 945000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/48.ecw",new Extent(845000, 2600000, 945000, 2500000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/49.ecw",new Extent(945000, 1900000, 1045000, 1800000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/4a.ecw",new Extent(945000, 2000000, 1045000, 1900000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/4b.ecw",new Extent(945000, 2100000, 1045000, 2000000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/4c.ecw",new Extent(945000, 2200000, 1045000, 2100000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/4d.ecw",new Extent(945000, 2300000, 1045000, 2200000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/4e.ecw",new Extent(945000, 2400000, 1045000, 2300000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/4f.ecw",new Extent(945000, 2500000, 1045000, 2400000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/e/56.ecw",new Extent(1110000, 1808000, 1200000, 1616000),1500,14000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/c/0.ecw",new Extent(40000, 2680000, 1200000, 1610000),14000,1000000);
            layer.AddComponent(component);

            //GRK
            layer = new GeoportailLayer("grk",lambert2e, new Extent(new UV(-140.0,2702605.10),new UV(1250000.0,1529970.46875)) , new UV(1.32291666666667,1.32291666666667), 944987, 886400,"/b/dmygrbr.jp2,/b/dmygrtl.jp2");
            metr.AddLayer(layer);

            //Add the components of the layer. Pain in the ass...
            component = new GeoportailLayerComponent(layer,"/b/7.ecw",new Extent(45991, 2678892, 1200995, 1618888),1500, 6250);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/b/2.ecw",new Extent(42487, 2682597, 1222500, 1615382),6250, 12500);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/b/6.ecw",new Extent(24985, 2680015, 1200014, 1604985),12500, 25000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/b/3.ecw",new Extent(-140, 2700000, 1222994, 1599855),50000, 100000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/b/5.ecw",new Extent(22526, 2702572, 1222940, 1595356),100000, 200000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/b/0.ecw",new Extent(24259, 2700865, 1221234, 1597023),200000, 1000000);
            layer.AddComponent(component);

            //Scan
            layer = new GeoportailLayer("scan",lambert2e, new Extent(new UV(0.0000000,2700000.000),new UV(1300100.0,1549900.000)) , new UV(2.50000,2.5000), 520040, 460040,"/f/dmyctometrobr.jp2,/f/dmyctometrotl.jp2");
            metr.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/a.ecw",new Extent(40000, 2680000, 1200000, 1610000),1500, 12500);
            layer.AddComponent(component);
                                                                                                                component = new GeoportailLayerComponent(layer,"/f/1a.ecw",new Extent(40000, 2680000, 1200000, 1610000),1500, 12500);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/15.ecw",new Extent(25000, 2680000, 1200000, 1605000),12500, 25000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/18.ecw",new Extent(30000, 2700000, 1230100, 1589900),25000, 75000);
            layer.AddComponent(component);

            //Can scaleMin == scaleMax? This component will probably never be displayed
            component = new GeoportailLayerComponent(layer,"/f/2.ecw",new Extent(0, 2700000, 1250000, 1600000),25000, 25000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/19.ecw",new Extent(0, 2700000, 1300100, 1549900),75000, 150000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/0.ecw",new Extent(0, 2700000, 1215000, 1595000),150000, 1000000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("alti",lambert2e, new Extent(new UV(-1.0347789e+5,2.809548e+6),new UV(1.256872e+6,1.6e+6)) , new UV(25.0000,25.000), 54014, 50200,"/a/dmydtmbr.jp2,/a/dmydtmtl.jp2");
            metr.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/a/0.ecw",new Extent(-1.0347789e+5,2.809548e+6, 1.256872e+6,1.6e+6),1500, 1000000);
            layer.AddComponent(component);

            //Saint-Pierre-et-Miquelon
            Proj spm_utm21n = new Proj(new string[]{"proj=utm","zone=21","units=m", "no.defs"});

            GeoportailTerritory spm = new GeoportailTerritory("spm",1500,300000);
            tmd[spm.Name] = spm;

            layer = new GeoportailLayer("scan",spm_utm21n, new Extent(new UV(5.430e+5,5.22500e+6),new UV(5.73e+5,5.1750e+6)) , new UV(2.5,2.5), 12000, 20000,"");
            spm.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/d.ecw",new Extent(543000, 5225000, 573000, 5175000),1500, 300000);
            layer.AddComponent(component);

            //Kerguelen
            Proj kerg_utm42s = new Proj(new string[]{"proj=utm","zone=42","south","units=m", "no.defs"});
            GeoportailTerritory kerg = new GeoportailTerritory("kerg",5000, 300000);

            tmd[kerg.Name] = kerg;

            layer = new GeoportailLayer("scan",kerg_utm42s, new Extent(new UV(4.2935e+5,4.6467e+6),new UV(6.4571e+5,4.4523e+6)) , new UV(10,10), 21636, 19440,"/f/dmyctokerbr.jp2,/f/dmyctokertl.jp2");
            kerg.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/6.ecw",new Extent(451750, 4628550, 632200, 4470700),1500, 50000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/8.ecw",new Extent(429350, 4646700, 645710, 4452300),50000, 300000);
            layer.AddComponent(component);

            //Guadeloupe
            Proj guad_mart_utm20n = new Proj(new string[]{"proj=utm","zone=20","units=m", "no.defs"});
            GeoportailTerritory guad = new GeoportailTerritory("guad",1500, 300000);

            tmd[guad.Name] = guad;

            layer = new GeoportailLayer("bdortho",guad_mart_utm20n, new Extent(new UV(4.820e+5,2.0060e+6),new UV(7.150e+5,1.7500e+6)) , new UV(0.5,0.5), 466000, 512000,"");
            guad.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/e/50.ecw",new Extent(482000, 2006000, 715000, 1750000),1500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("scan",guad_mart_utm20n, new Extent(new UV(4.8e+5,2.01e+6),new UV(7.2022e+5,1.74306e+6)) , new UV(2.5,2.5), 96088, 106776,"/f/dmyctoguabr.jp2,/f/dmyctoguatl.jp2");
            guad.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/b.ecw",new Extent(480000, 2010000, 720000, 1750000),1500, 300000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/3.ecw",new Extent(481480, 2005370, 720220, 1743060),12500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("alti",guad_mart_utm20n, new Extent(new UV(4.797342201845560e+5,2.011538517009150e+6),new UV(7.476842201845560e+5,1.733438517009150e+6)) , new UV(25,25),10718, 11124,"");
            guad.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/a/2.ecw",new Extent(1500, 1000000, 1500, 50000),1500, 300000);
            layer.AddComponent(component);

            //Martinique
            GeoportailTerritory mart = new GeoportailTerritory("mart",1500, 300000);

            tmd[mart.Name] = mart;

            layer = new GeoportailLayer("bdortho",guad_mart_utm20n, new Extent(new UV(6.890e+5,1.6470e+6),new UV(7.380e+5,1.590e+6)) , new UV(0.5,0.5), 98000, 114000,"");
            mart.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/e/51.ecw",new Extent(689000, 1647000, 738000, 1590000),1500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("scan",guad_mart_utm20n, new Extent(new UV(6.871e+5,1.6540e+6),new UV(7.53e+5,1.58250e+6)) , new UV(2.5,2.5), 26360, 28600,"/f/dmyctomarbr.jp2,/f/dmyctomartl.jp2");
            mart.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/c.ecw",new Extent(690000, 1650000, 740000, 1590000),1500, 300000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/4.ecw",new Extent(687100, 1654000, 753000, 1582500),12500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("alti",guad_mart_utm20n, new Extent(new UV(6.818436794941037e+5,1.657912564942177e+6),new UV(7.453422509622261e+5,1.583639361437386e+6)) , new UV(25,25),2540, 2971,"");
            mart.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/a/1.ecw",new Extent(690000, 1650000, 740000, 1590000),1500, 300000);
            layer.AddComponent(component);

            //Guyane
            Proj guya_utm22n = new Proj(new string[]{"proj=utm","zone=22","units=m", "no.defs"});

            GeoportailTerritory guya = new GeoportailTerritory("guya",1500, 500000);

            tmd[guya.Name] = guya;

            layer = new GeoportailLayer("bdortho",guya_utm22n, new Extent(new UV(1.51e+5,6.38e+5),new UV(3.65e+5,4.98e+5)) , new UV(0.5,0.5), 427999, 280000,"");
            guya.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/e/52.ecw",new Extent(151000, 638000, 365000, 498000),1500, 500000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("scan",guya_utm22n, new Extent(new UV(8.325192613901058e+4,6.783609006634455e+005),new UV(4.832519261390106e+005,1.783609000000000e+005)) , new UV(2.5,2.5), 160000, 200000,"/f/dmyctoguybr2.jp2,/f/dmyctoguytl2.jp2");
            guya.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/e.ecw",new Extent(150000, 640000, 420000, 460000),1500, 500000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/1.ecw",new Extent(100000, 643000, 450000, 343000),12500, 50000);
            layer.AddComponent(component);
                                                                                                            component = new GeoportailLayerComponent(layer,"/f/12.ecw",new Extent(83250, 678475, 483250, 178475),50000, 500000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("alti",guya_utm22n, new Extent(new UV(1.46e+5,6.40e+5),new UV(4.46e+5,4.50e+5)) , new UV(25,25),12000, 8000,"");
            guya.AddLayer(layer);

            component = new GeoportailLayerComponent(layer, "/a/3.ecw",new Extent(150000, 640000, 420000, 460000),1500, 500000);
            layer.AddComponent(component);

            //Wallis & Futuna
            Proj wafu_utm1s = new Proj(new string[]{"proj=utm","zone=1","south","units=m", "no.defs"});

            GeoportailTerritory wafu = new GeoportailTerritory("wafu",1500, 300000);

            tmd[wafu.Name] = wafu;

            layer = new GeoportailLayer("bdortho",wafu_utm1s, new Extent(new UV(3.7200e+5,8.5440e+6),new UV(8.41100e+6,8.4110e+6)) , new UV(0.5,0.5), 448000, 266000,"");
            wafu.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/e/55.ecw",new Extent(372000, 8544000, 596000, 8411000),1500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("scan",wafu_utm1s, new Extent(new UV(3.7119125e+5,8.543685e+6),new UV(5.9679125e+5,8.410245e+6)) , new UV(2.5,2.5), 90240, 53376,"");
            wafu.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/f.ecw",new Extent(371191, 8426565, 392951, 8410245),1500, 300000);
            layer.AddComponent(component);

            //Réunion
            Proj reun_utm40s = new Proj(new string[]{"proj=utm","zone=40","south","units=m", "no.defs"});

            GeoportailTerritory reun = new GeoportailTerritory("reun",1500, 300000);

            tmd[reun.Name] = reun;

            layer = new GeoportailLayer("bdortho",reun_utm40s, new Extent(new UV(3.13e+5,7.693e+6),new UV(3.810e+5,7.6330+6)) , new UV(0.5,0.5), 136000, 120000,"");
            reun.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/e/53.ecw",new Extent(13000, 7693000, 381000, 7633000),1500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("scan",reun_utm40s, new Extent(new UV(3.08377e+5,7.6979890e+6),new UV(3.853770e+5,7.626489e+6)) , new UV(2.5,2.5), 30800, 28600,"/f/dmyctoreubr.jp2,/f/dmyctoreutl.jp2");
            reun.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/11.ecw",new Extent(312000, 7692000, 382000, 7632000),1500, 300000);
            layer.AddComponent(component);
                                                                                                            component = new GeoportailLayerComponent(layer,"/f/5.ecw",new Extent(308377, 7697989, 385377, 7626489),12500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("alti",reun_utm40s, new Extent(new UV(3.05e+5,7.70e+6),new UV(3.95e+5,7.625e+6)) , new UV(25,25), 3600, 3000,"");
            reun.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/a/5.ecw",new Extent(312000, 7692000, 382000, 7632000),1500, 300000);
            layer.AddComponent(component);

            //Mayotte
            Proj mayo_utm38s = new Proj(new string[]{"proj=utm","zone=38","south","units=m", "no.defs"});

            GeoportailTerritory mayo = new GeoportailTerritory("mayo",1500, 300000);

            tmd[mayo.Name] = mayo;

            layer = new GeoportailLayer("bdortho",mayo_utm38s, new Extent(new UV(4.93e+5,8.61200e+6),new UV(5.340e+5,8.5520e+6)) , new UV(0.5,0.5), 82000, 120000,"");
            mayo.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/e/54.ecw",new Extent(493000, 8612000, 534000, 8552000),1500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("scan",mayo_utm38s, new Extent(new UV(5.00e+5,8.610e+6),new UV(5.400e+5,8.560e+6)) , new UV(2.5,2.5), 16000, 20000,"");
            mayo.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/10.ecw",new Extent(500000, 8610000, 540000, 8560000),1500, 300000);
            layer.AddComponent(component);

            layer = new GeoportailLayer("alti",mayo_utm38s, new Extent(new UV(5.00e+5,8.605e+6),new UV(5.40e+5,8.56e+6)) , new UV(25,25),1600, 1800,"");
            mayo.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/a/4.ecw",new Extent(500000, 8610000, 540000, 8560000),1500, 300000);
            layer.AddComponent(component);

            //Nouvelle-Calédonie
            Proj ncal_utm58s = new Proj(new string[]{"proj=utm","zone=58","south","units=m", "no.defs"});

            GeoportailTerritory ncal = new GeoportailTerritory("ncal",5000, 500000);

            tmd[ncal.Name] = ncal;

            layer = new GeoportailLayer("scan",ncal_utm58s, new Extent(new UV(3.40e+5,7.86e+6),new UV(8.40e+5,7.46e+6)) , new UV(5,5), 100000, 80000,"/f/dmyctoncabr.jp2,/f/dmyctoncatl.jp2");
            ncal.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/17.ecw",new Extent(340000, 7850000, 840000, 7470000),5000, 500000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/9.ecw",new Extent(40000, 7860000, 840000, 7460000),25000, 500000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/14.ecw",new Extent(340000, 7860000, 840000, 7460000),150000, 500000);
            layer.AddComponent(component);

            //Crozet
            Proj croz_utm39s = new Proj(new string[]{"proj=utm","zone=39","south","units=m", "no.defs"});

            GeoportailTerritory croz = new GeoportailTerritory("croz",5000, 300000);

            tmd[croz.Name] = croz;

            layer = new GeoportailLayer("scan",croz_utm39s, new Extent(new UV(4.152e+5,4.94255e+6),new UV(6.21e+5,4.81405e+6)) , new UV(5,5), 41160, 25700,"/f/dmyctocrobr.jp2,/f/dmyctocrotl.jp2");
            croz.AddLayer(layer);

            component = new GeoportailLayerComponent(layer,"/f/16.ecw",new Extent(547850, 4870000, 596000, 4851000),5000, 300000);
            layer.AddComponent(component);

            component = new GeoportailLayerComponent(layer,"/f/7.ecw",new Extent(421000, 4936000, 615000, 4835000),25000, 300000);
            layer.AddComponent(component);
        }
Beispiel #11
0
        public GeoportailTilesLayer(string name, TerritoryMetadata metadata, MainApplication parentApplication, GeoportailForm geoForm)
            : base(name)
        {
            this.name = name;
            this.metadata = metadata;
            this.parentApplication = parentApplication;
            this.geoForm = geoForm;
            dispTerritories = new Hashtable();

            EarthRadius = parentApplication.WorldWindow.CurrentWorld.EquatorialRadius;
            EarthHalfCirc = EarthRadius  * Math.PI;
            EarthCircum = EarthHalfCirc * 2.0;
        }
Beispiel #12
0
		public FileLoader(MainApplication app)
		{
			this.mainapp = app;

			InitializeComponent();
		}
Beispiel #13
0
        static void Main(string[] args)
        {
            try
            {
                if (BindingsCheck.FiftyBindingsWarning())
                {
                    return;
                }
                System.Threading.Thread.CurrentThread.Name = "Main Thread";
                Global.ParseArgs(args);
                //设置目录
                if (!Directory.Exists(Application.StartupPath + "/log"))
                {
                    Directory.CreateDirectory(Application.StartupPath + "/log");
                }
                Global.CurrentSettingsDirectory = Application.StartupPath + "/log";

                if (!File.Exists(Global.CurrentSettingsDirectory + "/WorldWind.xml"))
                {
                    Global.LoadSettings();
                    World.LoadSettings();
                }
                else
                {
                    Global.LoadSettings(Global.CurrentSettingsDirectory);
                    World.LoadSettings(Global.CurrentSettingsDirectory);
                }
                Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
                MainApplication app = new MainApplication();
                Application.Idle += new EventHandler(app.WorldWindow.OnApplicationIdle);
                Application.Run(app);

                World.Settings.Save();
                DataProtector dp = new DataProtector(DataProtector.Store.USE_USER_STORE);
                Global.Settings.ProxyUsername = dp.TransparentEncrypt(Global.Settings.ProxyUsername);
                Global.Settings.ProxyPassword = dp.TransparentEncrypt(Global.Settings.ProxyPassword);
                Global.Settings.Save();
            }
            catch (NullReferenceException)
            {
            }
            catch (Exception caught)
            {
                Exception e;
                string    errorMessages;
                try
                {
                    Log.Write(caught);
                }
                catch
                {
                }
                finally
                {
                    e             = caught;
                    errorMessages = "The following error(s) occurred:";
                    do
                    {
                        errorMessages += "\r\n" + e.Message;
                        e              = e.InnerException;
                    }while (e != null);
                    Abort(errorMessages);
                }
            }
        }
		public ImageOverlayList(ImageOverlayPlugin plugin) : base(plugin.Name)
		{

			//*************
			this.Plugin = plugin;
			ParentApplication = plugin.ParentApplication;
			Radius = (float)ParentApplication.WorldWindow.CurrentWorld.EquatorialRadius;
		
			ImageOverlay.Parent = this;

			Load();

			// true to make this layer active on startup, this is equal to the checked state in layer manager
			IsOn = true;

			ParentApplication.WorldWindow.MouseUp += new MouseEventHandler(WorldWindow_MouseUp);
			ParentApplication.WorldWindow.MouseDown += new MouseEventHandler(WorldWindow_MouseDown);
			ParentApplication.WorldWindow.MouseMove += new MouseEventHandler(WorldWindow_MouseMove);

			defaultImage = Path.Combine( plugin.PluginDirectory, "default.png" );
		}