ArcMap中输出tif图片时的Write GeoTIFF Tags选项,Engine中如何实现?

ArcMap中将Data View视图输出成tiff图片时的Write GeoTIFF Tags选项,Engine中如何实现?
已邀请:
【解决办法】:
需要设置IExportTIFF.GeoTiff 为true; 并且设置IWorldFileSettings.MapExtent,可以参考下面代码: 
调用代码: 
NewExport(axMapControl1.ActiveView, @D:\zxy.tif, 120); 
函数为:

private bool NewExport(IActiveView activeView, string pathFileName, int pOutDPI) 

if (activeView == null || !(pathFileName.EndsWith(.tif))) 

return false; 

IExport pExport = new ExportTIFFClass(); //创建输出对象 
pExport.ExportFileName = pathFileName; //定义输出图片位置

int screenResolution = 96; //屏幕分辨率 
int outputResulotion = pOutDPI; 
pExport.Resolution = outputResulotion; //定义输出图片分辨率 

tagRECT exportRECT; 
exportRECT.left = 0; 
exportRECT.top = 0; 
exportRECT.right = activeView.ExportFrame.right * (outputResulotion / screenResolution); 
exportRECT.bottom = activeView.ExportFrame.bottom * (outputResulotion / screenResolution); //获取当前要输出的区域 

// Set up the PixelBounds envelope to match the exportRECT 
IEnvelope pExportEnv = new EnvelopeClass(); 
pExportEnv.PutCoords(exportRECT.left, exportRECT.top, exportRECT.right, exportRECT.bottom); 
pExport.PixelBounds = pExportEnv; //设置输出图片大小 

IExportTIFF exportTiff = pExport as IExportTIFF; 
exportTiff.GeoTiff = true; 
exportTiff.CompressionType = esriTIFFCompression.esriTIFFCompressionLZW; 

IWorldFileSettings worldFileSet = pExport as IWorldFileSettings; 
worldFileSet.MapExtent = activeView.Extent; 

int hDC = pExport.StartExporting(); 

activeView.Output(hDC, Convert.ToInt32(outputResulotion), ref exportRECT, null, null); //输出图片 
pExport.FinishExporting(); //结束输出 
pExport.Cleanup(); //清理临时文件、释放内存 
return true; 

}

要回复问题请先登录注册