Introduction opening method --tin (rasters) various kinds of data in ArcGIS

4, loading raster files

Raster data in GIS is one of the important sources of data, such as satellite images , scanned maps , photos and so on.

Common format raster data have Bmp, Tiff, Jpg, Grid and so on.

Adding raster data Rasterlayer component class is mainly used, and IMap, ILayer, IRasterLayer interface. Rasterlayer component class implements ILayer, IRasterlayer, TTable, IDataset interfaces, mainly for opening raster data display, operating status, etc. is provided.

Describes a method to open the raster file

 

Core code:

 

#region added TIN data
         Private  void Add TIN data toolStripLabel1_Click ( Object SENDER, EventArgs E) 
        { 
            // methods: 
            AddTinFile (); 
        } 
        ///  <Summary> 
        /// loading raster layer
         ///  </ Summary> 
        Private  void AddTinFile () 
        { 
            the this .cursor = Cursors.WaitCursor; 
            IWorkspaceFactory pWorkspaceFactory = new new TinWorkspaceFactoryClass (); 

            the IWorkspace pWorkspace = pWorkspaceFactory.OpenFromFile (m_Path, 0 );
            PTinWorkspace ITinWorkspace = pWorkspace AS ITinWorkspace;
             // declare a variable PTIN, stored open "TiN" 
            ITIN PTIN = pTinWorkspace.OpenTin ( " TiN " );
             // The TIN TIN layer becomes 
            ITinLayer pTinLayer = new new TinLayerClass (); 
            pTinLayer.Dataset = PTIN; 
            pTinLayer.Name = " the TIN " ;
             // may be loaded with a three-dimensional space AxSceneControl
             // axSceneControl1.Scene.AddLayer (pTinLayer, to true); 
            the this.axMapControl1.AddLayer(pTinLayer);
            this.Cursor = Cursors.Default;

        }

        #endregion

 

Tin ways to load files into SceneControll objects and objects similar to MapControl.

Only need to

this.axMapControl1.AddLayer(pTinLayer);

Replaced

axSceneControl1.Scene.AddLayer(pTinLayer, true);

Additional information:

SceneControl dragged from toolbox required to interface window generated automatically SceneControll object.

Tin load files need to use two component classes: Scene and SceneGraph.

Scene is a vector, raster displays and graphic data processing container , which implements the IScene interfaces, a control Scene methods and properties, such as a method for increasing Addlayer layer to a scene.

SceneGraph is present in a container Scene recording data and events , which implements the ISceneGraph interfaces, methods and properties provided in the control and processing graphics Scene.

 

Renderings:

 

 

 

Thanks for watching! I am a novice GIS secondary development, if there is something wrong, please forgive me!

Guess you like

Origin www.cnblogs.com/edcoder/p/11718868.html