Raster calculator expression & empty output grid problem

4125
6
02-26-2014 04:40 AM
by Anonymous User
Not applicable
Original User: valtersanches

Hi All

How do i should write the notation in raster calculator (using ArcGIS 9x) to calculate Flow Lenght (downstream):
I tried this but something is wrong: FlowLength([flowdir_fill5],downstream).
The command line syntax is:
FlowLength_sa <in_flow_direction_raster> <out_raster> {DOWNSTREAM | UPSTREAM} {in_weight_raster}.
If i use the notation: FlowLength([flowdir_fill5]), the output is a flow lenght upstream grid (I need the downstream).
Before, i tried to use the Arctoolbox interface, but i have something wrong with my ArcGIS (9.3), because the output grid file is empty (see attached file), but, if i use the raster calculator, the output it's good (i did a test to slope raster with raster calculator and the output is good).
Regards.
0 Kudos
6 Replies
by Anonymous User
Not applicable
Original User: Hornbydd

An example of how to complete a valid command line for Arcmap 9.3 is shown in the help file here. Note it does not have () or [] which your example has.
0 Kudos
valteralbino
New Contributor
An example of how to complete a valid command line for Arcmap 9.3 is shown in the help file here. Not it does not have () or [] which your example has.



Dear Duncan,

My issue has two questions:
First, i tried to generate flow lenght raster through the arctoolbox interface (GUI), but the result was an empty raster grid file (attached file);
Secondly, in order to  sidestep this issue, i executed with success the flowlenght raster with the notation: FlowLength([flowdir_fill5]); but i wanted to generate the flow lenght using the donwslope option, however, it gives error when typing FlowLength([flowdir_fill5], downslope).

Note: Yes, i tried: flowlength(direction, weight, upstream); it needed ([])

So, i still need to solve the first issue, because all the raster generated through the Spatial Analyst GUI go wrong (empty grids);
i also didn't solved the 2^nd issue.
What do do... ?

Regards.
0 Kudos
by Anonymous User
Not applicable
Original User: Hornbydd

I still don't think you are completing the command line correctly. To be crystal clear you are attempting to execute the FlowLength via the command line and not the raster calculator? When I type into the command line window using the syntax as described in the 9.3 help file that I had given a link to it works fine for me, see the screen shot, so I'm not sure why its failing for you?

[ATTACH=CONFIG]31778[/ATTACH]
0 Kudos
valteralbino
New Contributor
Well,

I was trying to do with the raster calculator.
Also tried the example (without sucess):
flowlength([direction])
flowlength([direction], downstream).

The syntax FlowLength([flowdir_fill5]) gave the upstream output; but i'm still have problems in having the correct downstream output grid file.
I tried through the command line (but like the Arcoolbox GUI, it gave an empty grid file (see attached file).
0 Kudos
by Anonymous User
Not applicable
Original User: Hornbydd

OK a couple of other things to check:

Your flow direction grid, is it valid and for the area? When I say valid it has only the values of 1,2,4,8,16,32,64 & 128?

Do you have a pre-existing Processing Extent set which may be for some other region? You access that via the spatial analyst toolbar > options.

Finally if you are using the raster calculator from the spatial analyst toolbar have you tried the expressions

FLD = FlowLength([flowdir_fill5],"#","DOWNSTREAM")
FLU = FlowLength([flowdir_fill5],"#","UPSTREAM")

The expression for a raster calculator is flow direction grid, weight grid, keyword. So the "#" just means default as this is an optional parameter.

Duncan
0 Kudos
valteralbino
New Contributor
Thank you Duncan, my syntax was not complete.
Now, the output grid files area fine.
But still, if i try through the GUI (Arctoolbox) gives an empty grid file...
0 Kudos