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