Select to view content in your preferred language

Hydrology Flow Direction tool output "incorrect" when setting z limit

4947
11
06-03-2011 06:58 AM
by Anonymous User
Not applicable
Original User: wesley.king

ArcGIS v10 sp1, 64 bit Vista:
I've never seen this happen before, but I haven't done a hydrology analysis since installing v10.  When running the Fill tool and not setting the z limit (defaulting to fill all), then running flow direction the output is as expected...values of; 1,2,4,8,16,32,64,128.  Then running flow accumulation with with directional raster works as expected (see attachment).
BUT
When running the Fill tool and setting the z limit (trying about 8 different values), then running flow direction the output is NOT as expected...cells with values ranging 1-255.  Then running flow accumulation with this directional raster results in output that is obviously wrong (see attachment).

Anyone have any idea what's happening?

Thanks in advance,
Wes
0 Kudos
11 Replies
RickThalacker
New Contributor
The trouble I am having refers directly to the trouble in the top post.

"When running the Fill tool and not setting the z limit (defaulting to fill all), then running flow direction the output is as expected...values of; 1,2,4,8,16,32,64,128. Then running flow accumulation with with directional raster works as expected (see attachment).
BUT
When running the Fill tool and setting the z limit (trying about 8 different values), then running flow direction the output is NOT as expected...cells with values ranging 1-255."

I not sure this relates to filling fewer cells than previous version of ArcMap.

Rick

ver.10.1 with SP1 installed on machine.
0 Kudos
by Anonymous User
Not applicable
Original User: curtvprice


When running the Fill tool and setting the z limit (trying about 8 different values), then running flow direction the output is NOT as expected...cells with values ranging 1-255."


This is what I'd expect... if you set a Z limit, some areas are not filled, so there will be sinks remaining when you calculate flow direction. As described in the FlowDirection tool reference, sinks will be coded with values between 1 and 255 (ie non-powers of two) that code which cells flow into the sink. You can easily identify those sink cells using the extract By Attributes tool:

ExtractByAttributes("flowgrid", "flowgrid",
    "VALUE NOT IN (1,2,4,8,16,32,64,128)")


UPDATE: stackoverflow is awesome. Here's an arcpy map algebra way to do it that is just too cool, using the "bitwise and" operator &:

SetNull("flowgrid" != 0 and "flowgrid" < 256 and
    (("flowgrid" & ("flowgrid" - 1)) == 0, "flowgrid")
0 Kudos