Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
Have you already tried using Snap Pour Point and Watershed to see if that returns the result you are expecting for a test point? –  PolyGeo Oct 5 '12 at 3:18
    
Snap pour point tool reads whole drainage layer and then return a raster (which i used for watershed delineation) but i don't know if i can use snap raster for a point, can I? –  Ibe Oct 5 '12 at 3:38
    
resources.arcgis.com/en/help/main/10.1/index.html#//… says "If the input pour point data is a point feature class, it will be converted to a raster internally for processing." –  PolyGeo Oct 5 '12 at 8:36
    
Thanks. I got it working. Now I am trying to read cell coordinates and value. I can do that manually by pointing my cursor to point of interest and clicking it. Is it possible that somehow when i click a certain point over map that coordinate information is relayed to script as XY coordinate value? –  Ibe Oct 5 '12 at 8:43
add comment

2 Answers

up vote 1 down vote accepted

To do this I think you need to use:

  1. Snap Pour Point
  2. Watershed
  3. Feature Set parameter (to let you indicate a point on your map) for a model or script that runs the above

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:

import arcpy

geom = arcpy.GetParameter(0)

arcpy.Buffer_analysis(geom,"C:/Support/Prasad/test.gdb/testPntBuffer","1 DecimalDegrees","FULL","ROUND","NONE","#")

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:

enter image description here

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.

share|improve this answer
    
I tried feature set but its not as simple as it is with avenue while in arcview 3.3: return user point and then convert it to multipoint and then extract those by points. –  Ibe Oct 6 '12 at 5:37
    
By mistake I added comment instead below. –  A.D.Prasad Oct 6 '12 at 15:17
    
Thanks. It worked. –  Ibe Oct 8 '12 at 4:37
    
I have a followup question: Can we use interactive rectangle as the clipping geometry for specific layers? –  Ibe Nov 7 '12 at 9:30
    
I think so but have not tested. You can create a polygon feature class with the correct coordinate system to act as the schema for the clipping polygon, and then you can use a geometry in place of a feature class or layer use with Clip. If you have any problem making the polygon you input a rectangle can you post a new Question, please? –  PolyGeo Nov 7 '12 at 19:21
add comment

I think you can get better results with "archydro" tool for arcgis.

share|improve this answer
    
I agree. But i need to have it working in my workflow where this is just one step of many. –  Ibe Oct 6 '12 at 5:39
    
I think you are looking as an end user of a software package where in if you select any point, it should show/return with watershed area. If it is, so far not available. people like me or you have to develop this as we are working on watershed. But as you know, using arc hydro we can get most information if we stick to particular pour points instead of any point choosing randomly to get watershed. I am also looking for the similar tool. –  A.D.Prasad Oct 6 '12 at 15:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.