The IConditionalOp.SetNull() method returns a COM error when using grayscale and binary raster in ArcObjects 10.6.1 add-in.
上次发布: September 26, 2019ArcObjects SDK
漏洞 ID 编号
BUG-000120354
已提交
February 26, 2019
上次修改时间
June 5, 2024
适用范围
ArcObjects SDK
找到的版本
10.6.1
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
In ArcGIS SDK, certain changes had been made in Spatial Analyst extension. It is highly recommended that users to update their code accordingly.
Detailed information can be found here: https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#DataProcessingInSpatialAnalysisOperations.htm
An alternative way is to using geoprocessing to work with add-ins, here is more information on this topic:
https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#RunToolsInsideAnAdd-In.htm
解决办法
Use these lines of code:With error:pConditionalOp.SetNull(pLogicalOp.BooleanNot(pLogicalOp.IsNull((IGeoDataset)pRasterDataset)) as IGeoDataset, (IGeoDataset)_pDEM);No error:pConditionalOp.SetNull(pMathOp.Float(pLogicalOp.BooleanNot(pLogicalOp.IsNull((IGeoDataset)pRasterDataset))) as IGeoDataset,