3

Objective:

Gather pour points to define a specific-sized watershed. In this case, 1000 pixels. (for this thought exercise, watershed is to mean any point that flows through a pour point, regardless of size, not the NHD definition)

Layers:

DEM, flow direction, flow accumulation, the like.

Flow accumulation symbolized with 1/2 standard deviations on top of the DEM:flow accumulation map
My mathematician brother suggested the use of the modulus operator, which returns the remainder of a division problem, thus allowing something like `Con(("flow_accum" % 1000) < 10, 1, 0) in the Raster Calculator.
Theoretically, this should return a blip in the stream every thousand pixels of flow accumulation, but it doesn't.
What just the modulus ( just "flow_accum" % 1000) returns is this:
modulus map
I do not know how to interpret this. It should have low values for all pixels that are not near a X,000 but it appears to have just done some sort of rescaling to 1000 or something.
I did a manual selection of the first 12 watersheds with:

Con(("flow_accum" == 1000), 1, Con(("flow_accum" == 2000),2, Con(("flow_accum" == 3000)
,3,Con(("flow_accum" == 4000),4,Con(("flow_accum" == 5000),5,Con(("flow_accum" == 6000)
,6,Con(("flow_accum" == 7000),7,Con(("flow_accum" == 8000),8,Con(("flow_accum" == 9000)
,9,Con(("flow_accum" == 10000),10,Con(("flow_accum" == 11000),11,Con(("flow_accum" == 12000)
,12,Con(("flow_accum" == 13000),13,Con(("flow_accum" == 14000),14,0))))))))))))))

Which after running the watershed tool, returned this:
manual watershed delineation

What I need help with is making sense of the output of the modulus function, and defining arbitrarily-sized watersheds.

9
  • Does the range of values in your modulus raster actually go from 0 to 999? It looks like your con statement should only create values of 0 or 1 or NO_DATA.
    – L_Holcombe
    Commented Oct 17, 2012 at 6:41
  • 1
    No it doesn't, the con statement does return a binary mask, but didn't look useful, so I tried just the mod statement, which is what I pictured. I edited it to clarify, thanks.
    – forestman
    Commented Oct 17, 2012 at 6:46
  • 2
    0-999 is a correct range of values for x % 1000. 1000 % 1000 = 0, 1001 % 1000 = 1, 1999 % 1000 = 999, It seems to me like what you want is Con(("flow_accum" % 1000) == 0, 1, 0).
    – L_Holcombe
    Commented Oct 17, 2012 at 7:01
  • 2
    Please complete the question: exactly how do you want to choose those 1000 pour points? At equal distances along the streams? At equal intervals of flow accumulation? In a grid covering the watershed? Something else?
    – whuber
    Commented Oct 17, 2012 at 13:08
  • 1
    That would be every point whose flow accumulation equals 1000. Because many points will not have exactly 1000 for their flow accumulation, you might want to select those whose flow accumulation equals or exceeds 1000 and there is at least one point within its one-pixel neighborhood with a flow accumulation strictly less than 1000. There can be a large number of such points and their watersheds will overlap (considerably). I am mystified about the intended use of the modulus function, so I suspect you would really like to ask a different question than the one you seem to be asking... .
    – whuber
    Commented Dec 27, 2012 at 22:07

0