예제 #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 ribbonButton4_Click(object sender, EventArgs e)
 {
     if (vectorSurfaceLayerD != null)
     {
         m_earthRoot.removeChild(vectorSurfaceLayerD);
         vectorSurfaceLayerD = null;
     }
 }
예제 #3
0
 private void removeGroupOfEFG()
 {
     if (groupOfEFG != null)
     {
         m_earthRoot.removeChild(groupOfEFG);
         groupOfEFG          = null;
         vectorSurfaceLayerE = null;
         vectorSurfaceLayerF = null;
         vectorSurfaceLayerG = null;
     }
 }
예제 #4
0
 private void addVecLayerD()
 {
     if (vectorSurfaceLayerD == null)
     {
         vectorSurfaceLayerD              = new VectorSurfaceLayer();
         featureSourceOGR.url             = "E:\\OpenSceneGraph\\data\\world.shp";
         vectorSourceGeom.featureSource   = featureSourceOGR;
         vectorSurfaceLayerD.vectorSource = vectorSourceGeom;
         m_earthRoot.addChild(vectorSurfaceLayerD);
     }
 }
예제 #5
0
        private void ribbonButton42_Click(object sender, EventArgs e)
        {
            VectorSurfaceLayer zhengzhou = new VectorSurfaceLayer();
            VectorSourceGeom   geom      = new VectorSourceGeom();
            FeatureSourceOGR   ogr       = new FeatureSourceOGR();

            ogr.url = "E:\\OpenSceneGraph\\data\\zhengzhou\\440100郑州冬小麦prj.shp";
            //ogr.url = "E:\\OpenSceneGraph\\data\\henan\\dxmall\\河南省冬小麦.shp";
            geom.featureSource     = ogr;
            zhengzhou.vectorSource = geom;
            m_earthRoot.addChild(zhengzhou);
        }
예제 #6
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);
        }
예제 #7
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);
            }
        }
예제 #8
0
 private void ribbonButton4_Click(object sender, EventArgs e)
 {
     if (vectorSurfaceLayerD != null)
     {
         m_earthRoot.removeChild(vectorSurfaceLayerD);
         vectorSurfaceLayerD = null;
     }
 }
예제 #9
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);
        }
예제 #10
0
        private void ribbonButton42_Click(object sender, EventArgs e)
        {
            VectorSurfaceLayer zhengzhou = new VectorSurfaceLayer();
            VectorSourceGeom geom = new VectorSourceGeom();
            FeatureSourceOGR ogr = new FeatureSourceOGR();

            ogr.url = "E:\\OpenSceneGraph\\data\\zhengzhou\\440100郑州冬小麦prj.shp";
            //ogr.url = "E:\\OpenSceneGraph\\data\\henan\\dxmall\\河南省冬小麦.shp";
            geom.featureSource = ogr;
            zhengzhou.vectorSource = geom;
            m_earthRoot.addChild( zhengzhou );
        }
예제 #11
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;
        }
예제 #12
0
 private void removeGroupOfEFG()
 {
     if (groupOfEFG != null)
     {
         m_earthRoot.removeChild(groupOfEFG);
         groupOfEFG = null;
         vectorSurfaceLayerE = null;
         vectorSurfaceLayerF = null;
         vectorSurfaceLayerG = null;
     }
 }
예제 #13
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);
            }
        }
예제 #14
0
 private void addVecLayerD()
 {
     if (vectorSurfaceLayerD == null)
     {
         vectorSurfaceLayerD = new VectorSurfaceLayer();
         featureSourceOGR.url = "E:\\OpenSceneGraph\\data\\world.shp";
         vectorSourceGeom.featureSource = featureSourceOGR;
         vectorSurfaceLayerD.vectorSource = vectorSourceGeom;
         m_earthRoot.addChild(vectorSurfaceLayerD);
     }
 }