由RasterDataset得到RasterLayer


RasterDataset->RasterLayer IRasterLayer pRasterLayer = new RasterLayerClass(); pRasterLayer.CreateFromDataset(pRasterDataset); axMapControl1.Map.AddLayer(pRasterLayer as ILayer); ;

由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;

 

相关文章:

  • 2021-09-08
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2021-11-02
相关资源
相似解决方案