arcengine吧 关注:305贴子:633
  • 1回复贴,共1

ArcEngine栅格保存IRasterLayerExport3

只看楼主收藏回复

在使用ArcEngine调用ISaveAs2 saveas方法将栅格保存为TIFF,总是会出现问题,一般与路径有关,可以改用IRasterLayerExport3接口,示例代码如下:
IRasterLayerExport3 rasterLyrExport = new RasterLayerExportClass();
IRasterLayer rasterLayer = new RasterLayerClass();
rasterLayer.CreateFromRaster(raster);
rasterLyrExport.RasterLayer = rasterLayer;
rasterLyrExport.Force2RGB = false;IRasterDataset rasterDataset = rasterLyrExport.Export(workspace, System.IO.Path.GetFileName(filePath), format);Marshal.ReleaseComObject(rasterDataset);


IP属地:四川1楼2023-10-17 23:43回复
    🔝


    IP属地:四川来自Android客户端2楼2023-12-11 10:17
    回复