# 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: 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: 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: # What I need help with is making sense of the output of the modulus function, and defining arbitrarily-sized watersheds.

## closed as not a real question by whuber♦Mar 5 '13 at 2:06

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

• 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 Oct 17 '12 at 6:41
• 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 Oct 17 '12 at 6:46
• 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 Oct 17 '12 at 7:01
• That gets me much closer. It still flags the 0 flow accumulation pixels as 1, which is to be expected, so now I need to just remove the 0 pixels first. – forestman Oct 17 '12 at 7:24
• 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 Oct 17 '12 at 13:08