예제 #1
0
        private void Initialize()
        {
            // Create the scene.
            _mySceneView.Scene = new Scene(Basemap.CreateImagery());

            // Get the path to the elevation raster.
            string packagePath = DataManager.GetDataFolder("98092369c4ae4d549bbbd45dba993ebc", "MontereyElevation.dt2");

            // Create the elevation source from a list of paths.
            RasterElevationSource elevationSource = new RasterElevationSource(new[] { packagePath });

            // Create a surface to display the elevation source.
            Surface elevationSurface = new Surface();

            // Add the elevation source to the surface.
            elevationSurface.ElevationSources.Add(elevationSource);

            // Add the surface to the scene.
            _mySceneView.Scene.BaseSurface = elevationSurface;

            // Set an initial camera viewpoint.
            Camera camera = new Camera(36.51, -121.80, 300.0, 0, 70.0, 0.0);

            _mySceneView.SetViewpointCamera(camera);
        }
        private void TrueCalculation()
        {
            // Create a scene with elevation.
            Surface sceneSurface = new Surface();

            var Dted1Files = new List <string>();

            Dted1Files.Add(dtedDirectory);

            RasterElevationSource dted1ElevSource = new RasterElevationSource(Dted1Files);

            sceneSurface.ElevationSources.Add(dted1ElevSource);

            AnalysisOverlay measureAnalysisOverlay = new AnalysisOverlay();

            MySceneView.AnalysisOverlays.Add(measureAnalysisOverlay);
        }