示例#1
0
        private void ribbonButton13_Click(object sender, EventArgs e)
        {
            m_earthRoot.removeChildren();
            imageSurfaceLayerA       = null;
            imageSurfaceLayerB       = null;
            imageSurfaceLayerC       = null;
            imageSurfaceLayerDebug   = null;
            imageSurfaceLayerNoise   = null;
            imageSurfaceLayerAGGLite = null;
            imageSurfaceLayerMBTiles = null;
            imageSurfaceLayerArcGIS  = null;

            vectorSurfaceLayerD = null;

            groupOfEFG          = null;
            vectorSurfaceLayerE = null;
            vectorSurfaceLayerF = null;
            vectorSurfaceLayerG = null;

            tmsImageSurfaceLayerH     = null;
            tmsElevationSurfaceLayerI = null;

            elevSurfaceLayerJ     = null;
            elevSurfaceLayerNoise = null;
        }
示例#2
0
 private void removeGroupOfEFG()
 {
     if (groupOfEFG != null)
     {
         m_earthRoot.removeChild(groupOfEFG);
         groupOfEFG          = null;
         vectorSurfaceLayerE = null;
         vectorSurfaceLayerF = null;
         vectorSurfaceLayerG = null;
     }
 }
示例#3
0
        public MainForm()
        {
            InitializeComponent();
            m_earthMap = axEarthCtrl1.getEarthMap();
            m_earthMap.maxThreadsNum = 10;//设置可用线程上限

            m_earthRoot = axEarthCtrl1.getEarthRoot();

            m_sky = new Sky();
            axEarthCtrl1.setActiveSky(m_sky);

            addVPAsia();
            axEarthCtrl1.setHomeViewpoint(vpAsia);

            axEarthCtrl1.run();

            tileSourceGDAL   = new TileSourceGDAL();
            tileSourceTMS    = new TileSourceTMS();
            vectorSourceGeom = new VectorSourceGeom();
            featureSourceOGR = new FeatureSourceOGR();
        }
示例#4
0
        public MainForm()
        {
            InitializeComponent();
            m_earthMap = axEarthCtrl1.getEarthMap();
            m_earthMap.maxThreadsNum = 10;//设置可用线程上限

            m_earthRoot = axEarthCtrl1.getEarthRoot();

            m_sky = new Sky();
            axEarthCtrl1.setActiveSky( m_sky );

            addVPAsia();
            axEarthCtrl1.setHomeViewpoint( vpAsia );

            axEarthCtrl1.run();

            tileSourceGDAL = new TileSourceGDAL();
            tileSourceTMS = new TileSourceTMS();
            vectorSourceGeom = new VectorSourceGeom();
            featureSourceOGR = new FeatureSourceOGR();
        }
示例#5
0
        private void ribbonButton9_Click(object sender, EventArgs e)
        {
            uint pos = 2;

            //先把引用了pos位置的物体的引用设为null
            IEarthObject earthObject = m_earthRoot.getChild(pos);

            if (earthObject == null)
            {
                return;
            }

            if (earthObject.equal(imageSurfaceLayerA))
            {
                imageSurfaceLayerA = null;
            }
            else if (earthObject.equal(imageSurfaceLayerB))
            {
                imageSurfaceLayerB = null;
            }
            else if (earthObject.equal(imageSurfaceLayerC))
            {
                imageSurfaceLayerC = null;
            }
            else if (earthObject.equal(vectorSurfaceLayerD))
            {
                vectorSurfaceLayerD = null;
            }
            else if (earthObject.equal(groupOfEFG))
            {
                groupOfEFG          = null;
                vectorSurfaceLayerE = null;
                vectorSurfaceLayerF = null;
                vectorSurfaceLayerG = null;
            }

            m_earthRoot.removeChildByPos(pos);
        }
示例#6
0
        private void addVecLayerEFG()
        {
            if (groupOfEFG == null)
            {
                groupOfEFG = new EarthGroup();

                if (vectorSurfaceLayerE == null)
                {
                    vectorSurfaceLayerE              = new VectorSurfaceLayer();
                    featureSourceOGR.url             = "E:\\OpenSceneGraph\\data\\China\\中国_省.shp";
                    vectorSourceGeom.featureSource   = featureSourceOGR;
                    vectorSurfaceLayerE.vectorSource = vectorSourceGeom;
                    groupOfEFG.addChild(vectorSurfaceLayerE);
                }

                if (vectorSurfaceLayerF == null)
                {
                    vectorSurfaceLayerF              = new VectorSurfaceLayer();
                    featureSourceOGR.url             = "E:\\OpenSceneGraph\\data\\China\\中国_市.shp";
                    vectorSourceGeom.featureSource   = featureSourceOGR;
                    vectorSurfaceLayerF.vectorSource = vectorSourceGeom;
                    groupOfEFG.addChild(vectorSurfaceLayerF);
                }

                if (vectorSurfaceLayerG == null)
                {
                    vectorSurfaceLayerG              = new VectorSurfaceLayer();
                    featureSourceOGR.url             = "E:\\OpenSceneGraph\\data\\China\\中国_区县.shp";
                    vectorSourceGeom.featureSource   = featureSourceOGR;
                    vectorSurfaceLayerG.vectorSource = vectorSourceGeom;
                    groupOfEFG.addChild(vectorSurfaceLayerG);
                }

                m_earthRoot.addChild(groupOfEFG);
            }
        }
示例#7
0
        private void ribbonButton9_Click(object sender, EventArgs e)
        {
            uint pos = 2;

            //先把引用了pos位置的物体的引用设为null
            IEarthObject earthObject = m_earthRoot.getChild(pos);
            if (earthObject == null)
            {
                return;
            }

            if (earthObject.equal(imageSurfaceLayerA))
            {
                imageSurfaceLayerA = null;
            }else if (earthObject.equal(imageSurfaceLayerB))
            {
                imageSurfaceLayerB = null;
            }else if (earthObject.equal(imageSurfaceLayerC))
            {
                imageSurfaceLayerC = null;
            }else if (earthObject.equal(vectorSurfaceLayerD))
            {
                vectorSurfaceLayerD = null;
            }else if (earthObject.equal(groupOfEFG))
            {
                groupOfEFG = null;
                vectorSurfaceLayerE = null;
                vectorSurfaceLayerF = null;
                vectorSurfaceLayerG = null;
            }

            m_earthRoot.removeChildByPos(pos);
        }
示例#8
0
        private void ribbonButton13_Click(object sender, EventArgs e)
        {
            m_earthRoot.removeChildren();
            imageSurfaceLayerA = null;
            imageSurfaceLayerB = null;
            imageSurfaceLayerC = null;
            imageSurfaceLayerDebug = null;
            imageSurfaceLayerNoise = null;
            imageSurfaceLayerAGGLite = null;
            imageSurfaceLayerMBTiles = null;
            imageSurfaceLayerArcGIS = null;

            vectorSurfaceLayerD = null;

            groupOfEFG = null;
            vectorSurfaceLayerE = null;
            vectorSurfaceLayerF = null;
            vectorSurfaceLayerG = null;

            tmsImageSurfaceLayerH = null;
            tmsElevationSurfaceLayerI = null;

            elevSurfaceLayerJ = null;
            elevSurfaceLayerNoise = null;
        }
示例#9
0
 private void removeGroupOfEFG()
 {
     if (groupOfEFG != null)
     {
         m_earthRoot.removeChild(groupOfEFG);
         groupOfEFG = null;
         vectorSurfaceLayerE = null;
         vectorSurfaceLayerF = null;
         vectorSurfaceLayerG = null;
     }
 }
示例#10
0
        private void addVecLayerEFG()
        {
            if (groupOfEFG == null)
            {
                groupOfEFG = new EarthGroup();

                if (vectorSurfaceLayerE == null)
                {
                    vectorSurfaceLayerE = new VectorSurfaceLayer();
                    featureSourceOGR.url = "E:\\OpenSceneGraph\\data\\China\\中国_省.shp";
                    vectorSourceGeom.featureSource = featureSourceOGR;
                    vectorSurfaceLayerE.vectorSource = vectorSourceGeom;
                    groupOfEFG.addChild(vectorSurfaceLayerE);
                }

                if (vectorSurfaceLayerF == null)
                {
                    vectorSurfaceLayerF = new VectorSurfaceLayer();
                    featureSourceOGR.url = "E:\\OpenSceneGraph\\data\\China\\中国_市.shp";
                    vectorSourceGeom.featureSource = featureSourceOGR;
                    vectorSurfaceLayerF.vectorSource = vectorSourceGeom;
                    groupOfEFG.addChild(vectorSurfaceLayerF);
                }

                if (vectorSurfaceLayerG == null)
                {
                    vectorSurfaceLayerG = new VectorSurfaceLayer();
                    featureSourceOGR.url = "E:\\OpenSceneGraph\\data\\China\\中国_区县.shp";
                    vectorSourceGeom.featureSource = featureSourceOGR;
                    vectorSurfaceLayerG.vectorSource = vectorSourceGeom;
                    groupOfEFG.addChild(vectorSurfaceLayerG);
                }

                m_earthRoot.addChild(groupOfEFG);
            }
        }