I have 40 pour points and want to find out the area upstream of each pour point. I see that I can use the 'Watershed' tool for this. However, I do not want to do this manually. Therefore, I am trying to use ArcPy to delineate the upstream drainage areas in a for
loop.
My question is how do I specify the pour point in the Watershed tool? The syntax is:
outWatershed = Watershed('flowdir', 'pourpoint')
How do I specify the pour points in the for loop? My pour points are contained in a point feature class named 'delineation_points'. I learned that I can use data cursor for this purpose, but I do not understand how? For example,
cursor = arcpy.da.SearchCursor('delineation_points','*')
a = cursor.next()
Here, the variable 'a' gives me the field values for the first point in the 'delineation_points' feature class? If I use this as input to the 'Watershed' in place of 'pourpoint', it gives an error:
outWatershed = Watershed('flowdir', a)
I am sure there is something wrong with the way I am giving 'a' as the input.