|
请问下arcgis engine 使用IMathOp.Minus运算后的结果怎么保存啊.我用IsaveAs保存后是黑色的一片,但是我添加到axMapControl1中却是有图像显示的..具体代码如下- ESRI.ArcGIS.SpatialAnalyst.IMathOp mo = new ESRI.ArcGIS.SpatialAnalyst.RasterMathOpsClass();
- IRaster result2 = mo.Minus(layer2 as IGeoDataset, layer as IGeoDataset) as IRaster;
- ISaveAs save = result2 as ISaveAs;
- save.SaveAs(System.Environment.CurrentDirectory + "\\img\\difflayer01.img", null, "IMAGINE Image");
- //添加到axMapControl1中显示,此结果是正确的.
- IRasterLayer diffLayer = new RasterLayerClass();
- diffLayer.CreateFromRaster(result2);
- diffLayer.Name = "difflayer";
- axMapControl1.AddLayer(diffLayer, 0);
- axMapControl1.Refresh();
复制代码 |
|