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

Erro

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

Última Publicação: February 17, 2017 ArcGIS for Desktop
Número de ID do Erro BUG-000087994
EnviadoJune 1, 2015
Última ModificaçãoJune 5, 2024
Aplica-se àArcGIS for Desktop
Versão encontrada10.0
Sistema OperacionalWindows OS
Versão do Sistema Operacional7 64 Bit
StatusKnown Limit

Informações Adicionais

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

Solução Provisória

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.

Etapas para Reproduzir

ID do Erro: BUG-000087994

Software:

  • ArcGIS for Desktop

Seja notificado quando o status de um erro mudar

Baixe o Aplicativo de Suporte da Esri

Descubra mais sobre este tema

Obtenha ajuda de especialistas do ArcGIS

Entre em contato com Suporte Técnico

Baixe o Aplicativo de Suporte da Esri

Ir para as opções de download