|
语句如下:Con("Reclass_ndvi1" == 1 & "Reclass_Slop3" == 1,100,0)
其中:Reclass_ndvi1和Reclass_Slop3均为栅格图册,且范围一致,重叠。
想法:如果Reclass_ndvi1的值为1,且Reclass_Slop3的值为1时,输出100,否则输出0;
但是运行的时候老是出错,代码如下:
ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
File "<expression>", line 1, in <module>
File "<string>", line 5, in rcexec
ValueError: The truth value of a raster is ambiguous. Invalid use of raster with Boolean operator or function. Check the use of parentheses where applicable.
执行(RasterCalculator)失败。
谷歌翻译为:
错误000539:表达式运行错误:rcexec()
追踪(最新最后调用):
文件“的<expression>”,1号线,在的<module>
文件“<STRING>”,5号线,在rcexec
ValueError异常:一个栅格的真值是不明确的。无效使用光栅与布尔运算符或函数。检查使用括号(如适用)。
执行(RasterCalculator)失败。
为什么会出现这样的错误啊,感觉逻辑是没错的啊,这个错误是什么意思呢?
|
|