数据源为文件型数据源,代码如下:
var m_dataImport = new DataImport();
var importSettingTIF = new ImportSettingTIF
{
MultiBandImportMode = MultiBandImportMode.SingleBand,
ImportMode = ImportMode.Overwrite,
SourceFilePath = path,
TargetDatasource = datasource,
IsPyramidBuilt = false,
ImportingAsGrid = true,
WorldFilePath = path.Split('.')[0] + ".tfw",
TargetEncodeType = EncodeType.LZW,
TargetDatasetName = name
};
m_dataImport.ImportSettings.Add(importSettingTIF);
var dataset = m_dataImport.Run();
Console.WriteLine(dataset.SucceedSettings.Length);
命令行显示成功条数为0