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

Bug

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

Zuletzt veröffentlicht: February 17, 2017 ArcGIS for Desktop
Bug-ID-Nummer BUG-000087994
EingereichtJune 1, 2015
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS for Desktop
Gefunden in Version10.0
BetriebssystemWindows OS
Betriebssystemversion7 64 Bit
StatusKnown Limit

Zusätzliche Informationen

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

Workaround

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.

Schritte zur Reproduzierung

Bug-ID: BUG-000087994

Software:

  • ArcGIS for Desktop

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln