你推荐的范例里面的代码为:
m_dataImport.ImportSettings.Clear();
ImportSettingIMG imgSetting = new ImportSettingIMG();
imgSetting.ImportMode = ImportMode.Overwrite;
imgSetting.SourceFilePath = @"..\..\SampleData\DataExchange\ImgImport\Multibands.img";
imgSetting.TargetDatasource = m_desDatasource;
imgSetting.MultiBandImportMode = MultiBandImportMode.MultiBand;
m_dataImport.ImportSettings.Add(imgSetting);
m_dataImport.Run();
DatasetImage importResult = m_desDatasource.Datasets["Multibands"] as DatasetImage;
LayerSettingImage layerSetting = new LayerSettingImage();
layerSetting.DisplayBandIndexes = new Int32[] { 3, 2, 1};
layerSetting.DisplayColorSpace = ColorSpaceType.RGB;
m_mapControl.Map.Layers.Clear();
m_mapControl.Map.Layers.Add(importResult, layerSetting, true);
m_mapControl.Map.IsDynamicProjection = false;
m_mapControl.Map.ViewEntire();
m_mapControl.Map.Refresh();
和你刚刚说的:
大数据量的影像一般是通过新建镶嵌数据集实现的,先新建一个数据源Datasource,再通过数据源Datasource下的Datasets去新建一个数据集Dataset ,设置其type为Mosaic,再把这个数据集Dataset转化为DatasetMosaic,再通过文档去搜索,通过addfiles方法添加影像tif,添加完过后再执行BuildOverview与BuildPyramid方法
有所不同呢?请问要实现我的需求,要参考哪一个?