使用产品:SuperMap iObjects .NET 10i(2020) SP2 for Windows(32位)(Bin包)
操作系统:win11 x64
数据类型:文件型
问题详细描述:TIF影像转换为SIT时,执行以下代码,程序没有任何报错但也没有任何结果产生。
public void ExportSettingSIT() {
// 定义工作空间
Workspace workspace = new Workspace();
SuperMap.Data.Datasources dss = workspace.Datasources;
DatasourceConnectionInfo datasourceConnectInfo = new DatasourceConnectionInfo();
var tifpath = "C:\\Users\\Shuai.W\\Desktop\\SuperMap测试\\TIF2000影像(91)\\TIF2000影像91.tif";
datasourceConnectInfo.Server = tifpath;
datasourceConnectInfo.Alias = "TIF2000影像91";
datasourceConnectInfo.EngineType = EngineType.ImagePlugins;
SuperMap.Data.Datasource ds = dss["TIF2000影像91"];
ds = dss.Open(datasourceConnectInfo);
SuperMap.Data.Conversion.ExportSettingTIF exportTIF = new SuperMap.Data.Conversion.ExportSettingTIF(ds, "C:\\Users\\Shuai.W\\Desktop\\SuperMap测试\\TIF2000影像(91)\\sss\\a.sit", SuperMap.Data.Conversion.FileType.SIT);
//设置压缩编码
exportTIF.Compression = SuperMap.Data.Conversion.TIFFCompression.COMPRESSION_JPEG;
SuperMap.Data.Conversion.DataExport dataExport = new SuperMap.Data.Conversion.DataExport();
dataExport.ExportSettings.Add(exportTIF);
//挂接事件,监听转换过程
dataExport.Stepped += new SuperMap.Data.Conversion.ExportSteppedEventHandler(DataExport_Stepped);
//开始转换
dataExport.Run();
workspace.Close();
}