IRaster、IRasterlayer、IRasterdataset之间的转换

时间:2022-02-05 01:40:49

IRaster、IRasterlayer、IRasterdataset之间的转换

layer = axMapControl.get_Layer(0);//需要的栅格图层

IRasterLayer rasterlayer = layer as IRasterLayer;

IRaster raster = rasterlayer.Raster;

IRasterBandCollection rasterbandcollection = raster as IRasterBandCollection;

IRasterBand rasterband = rasterbandcollection.Item(0);

IRasterDataset rasterdataset = rasterband as IRasterDataset;

from:http://hi.baidu.com/cya_lm/item/6f2fbceb33f3510a4ddcaf43