I have a drainage density map and i want to interactively retrieve watershed by clicking a point on map. Once I zoomed to an area of interest and click the highest accumulation point of my choice then i get in return watershed only encompassing that outlet. I am wondering if anyone had already done that manually or automatically. Any suggestion to do it will be helpful.
Thanks.
Best Answer
To do this I think you need to use:
UPDATE
I do not have a Spatial Analyst license to test the Snap Pour Point and Watershed parts, but I just tested the Feature Set parameter to ask a user to input a point using the cursor on a map, and then buffer it. This demonstrates the remaining bit that seems to be causing you problems.
The Python script (test.py) is:
I then created a point feature class with the correct coordinate system to act as the schema for the point I want to Buffer (or in your case to Snap Pour Point then Watershed).
When I used Add Script to create a tool from test.py I just gave it one parameter:
With that done I run the tool, which gives me the chance to click on the map to create a point geometry that gets passed to the Python script to Buffer it.