0.1".
>>> Con(("Random1.tif" > 0.1),"Random1.tif",Con(("Random2.tif">0.1),"Random2.tif",0.1))
In stead, defining a raster object first for this layer, then the complex expression should work.
>>> rasob = arcpy.sa.Raster("Random1.tif")
>>> outras = Con((rasob > 0.1),"Random1.tif",Con((rasob> 0.1),"Random2.tif",0.1))"/>
获取应用程序中的漏洞更新
URL 已复制共享 URL
漏洞
The prescribed Python syntax for complex conditional expressions does not work outside of the Raster Calculator.
上次发布: February 17, 2017ArcGIS for Desktop
漏洞 ID 编号
BUG-000087994
已提交
June 1, 2015
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
10.0
操作系统
Windows OS
操作系统版本
7 64 Bit
状态
Known Limit
经开发团队审核,已确定此问题与不受 Esri 控制的软件的已知限制有关。 问题的“其他信息”部分可能包含进一步说明。
附加信息
The expression below won''t work in python, because map algebra take raster object as input, while "Random1.tif" would be treated as string but not raster in the expression ""Random1.tif">0.1".
>>> Con(("Random1.tif" > 0.1),"Random1.tif",Con(("Random2.tif">0.1),"Random2.tif",0.1))
In stead, defining a raster object first for this layer, then the complex expression should work.
>>> rasob = arcpy.sa.Raster("Random1.tif")
>>> outras = Con((rasob > 0.1),"Random1.tif",Con((rasob> 0.1),"Random2.tif",0.1))