Raster calculator too many values to unpack

485
1
04-02-2012 08:15 PM
IsaacKelder
New Contributor
I'm trying to use raster calculator to create a new raster from my flow accumulation data. I've changed the data range to two intervals so only the main channels are shown. What I want to do is create a new raster with this information. I am trying to alter this DEM to make it compatible with the CAESAR landscape evolution model, and this is one of the steps required.

The instructions tell me to put the following calculation into raster calculator: [mainChannel]  = [flowAcc]  > 500

As it is only an example I changed the equation to the following: [mainChannel]  = ["brdaflowacc"]  > 45000

It makes sense in theory since the main channels are all above 45000 however I get the following error when I try to make this calculation work


ERROR 000539: Error running expression: rcexec() <type 'exceptions.ValueError'>: too many values to unpack.


As I am relatively inexperienced with arcgis I cannot figure out why it is doing this.
0 Kudos
1 Reply
curtvprice
MVP Esteemed Contributor


ERROR 000539: Error running expression: rcexec() <type 'exceptions.ValueError'>: too many values to unpack.


As I am relatively inexperienced with arcgis I cannot figure out why it is doing this.


The syntax you're showing is for the 9.3 raster calculator.

In 10.0 the Raster Calculator tool has a slightly different syntax. The brackets are no longer legal, but you can refer to layers in the map by name in quotes, like this:

"brdaflowacc" > 45000


and set the output of the tool to be a raster named "mainChannel".
0 Kudos