码迷,mamicode.com
首页 > 其他好文 > 详细

栅格数据处理 RasterDataset RasterLayer Raster RasterBandCollection

时间:2014-09-27 00:34:18      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   ar   数据   sp   div   on   cti   

1  IRasterLayer myrasterlayer = MapControl.Map.Layer[index] as IRasterLayer;
2 IRaster myRaster = myrasterlayer.Raster;
3 IRasterBandCollection myRasterBandCollection = myRaster as IRasterBandCollection;
4 IRasterBand myRasterBand = myRasterBandCollection.Item(0);
5 IRasterDataset myRasterDataset = myRasterBand as IRasterDataset;
bubuko.com,布布扣

 .由RasterLayer 得到RasterDataset

RasterLayer->RasterDataset
IRasterLayer myrasterlayer = MapControl.Map.Layer[index] as IRasterLayer;
IRaster myRaster = myrasterlayer.Raster;
IRasterBandCollection myRasterBandCollection = myRaster as IRasterBandCollection;
IRasterBand myRasterBand = myRasterBandCollection.Item(0);
IRasterDataset myRasterDataset = myRasterBand as IRasterDataset;

 

 

2.由RasterDataset 到RasterLayer

1  IRasterLayer pRasterLayer = new RasterLayerClass(); 
2
3 pRasterLayer.CreateFromDataset(pRasterDataset);
4
5 axMapControl1.Map.AddLayer(pRasterLayer as ILayer); ;

 

 

 

 

 

 

1  IRasterLayer pRasterLayer = new RasterLayerClass(); 
2
3 pRasterLayer.CreateFromDataset(pRasterDataset);
4
5 axMapControl1.Map.AddLayer(pRasterLayer as ILayer); ;

栅格数据处理 RasterDataset RasterLayer Raster RasterBandCollection

标签:blog   http   io   ar   数据   sp   div   on   cti   

原文地址:http://www.cnblogs.com/yuxuetaoxp/p/3995603.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!