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; }
private void ribbonButton4_Click(object sender, EventArgs e) { if (vectorSurfaceLayerD != null) { m_earthRoot.removeChild(vectorSurfaceLayerD); vectorSurfaceLayerD = null; } }
private void removeGroupOfEFG() { if (groupOfEFG != null) { m_earthRoot.removeChild(groupOfEFG); groupOfEFG = null; vectorSurfaceLayerE = null; vectorSurfaceLayerF = null; vectorSurfaceLayerG = null; } }
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); } }
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); }
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); }
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); } }
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); }
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 ); }