I am trying to extract stream raster from a flow accumulation raster using Conditional Tool in Spatial Analyst.

Here's my input:

  1. Input Raster: FLOWACC.tif
  2. Expression: Value >= 3.5
  3. True Raster: 1
  4. Output raster: Stream.tif

Error gives me invalid expression. Basically my objective is to isolate all values >=3.5 and consider them as stream raster.

I am using ArcGIS 10.2 for Desktop.

  • the expression should be : "Value" >=3.5, not Value >=3.5
    – radouxju
    Commented Sep 5, 2014 at 11:28

3 Answers 3


In the raster calculator you must use this:

stream = con([FLOWACC] > 3.5, 1)

try this from the python window

#import arcpy

arcpy.env.workspace = #path to workspace
input_raster = #path to input raster
r = arcpy.Raster(input_raster)
output_raster = #path to output raster
temp_r = arcpy.sa.Con(r>=3.5,1)

Refer to the Con Tool documentation for more information.

  • Con is unnecessary: the result of the comparison r>=3.5 is already what is needed. In some applications, SetNull needs to be applied to the negation of the criterion so that cells which do not meet it are replaced with NoData--but Con is still superfluous.
    – whuber
    Commented Sep 5, 2014 at 19:48

You might have to convert your raster to integer first using the raster calculator:



Then query with value >= 35

  • 2
    Could you please describe the purpose of int(raster*10)?
    – Aaron
    Commented Sep 4, 2014 at 3:57
  • 1
    Times 10 doesn't help here
    – FelixIP
    Commented Sep 4, 2014 at 5:40
  • It seems that using SQL icon interface, instead of typing into expression box might help
    – FelixIP
    Commented Sep 4, 2014 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.