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))"/>
laptop and a wrench

漏洞

The prescribed Python syntax for complex conditional expressions does not work outside of the Raster Calculator.

上次发布: February 17, 2017 ArcGIS for Desktop
漏洞 ID 编号 BUG-000087994
已提交June 1, 2015
上次修改时间June 5, 2024
适用范围ArcGIS for Desktop
找到的版本10.0
操作系统Windows OS
操作系统版本7 64 Bit
状态Known Limit

附加信息

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))

解决办法

Using the syntax containing the <where_clause> parameter from the following help resources, it is still possible to create complex Conditional expressions. 10.0: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z00000008000000.htm. 10.2: http://resources.arcgis.com/en/help/main/10.2/index.html#//009z00000008000000. 10.3: http://desktop.arcgis.com/en/desktop/latest/tools/spatial-analyst-toolbox/conditional-evaluation-with-con.htm.

重现步骤

漏洞 ID: BUG-000087994

软件:

  • ArcGIS for Desktop

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项