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.

Hi this is probably a longer-winded question than it needs to be, but please bear with me. I have a large number of pour points - approximately 250,000 for which I want to delineate the upstream watershed area using ArcHydro's "Batch Watershed Delineation". Given that it takes roughly 4-5 hours for 1000 points to delineate on my system I need to find a faster way than just running these as individual processes on my computer. Currently I am testing out running 4 sets of 1000 side-by-side on my 64bit windows i7 system, so that will likely speed up the process, but I think it could be sped up even more through an opportunity to access a "condor" type system which runs multiple applications of a program at any given time.

The catch is that I need to talk to ArcGIS from a command line and also get ArcHydro to work from command line to do the upstream watershed delineation. I know the files that I require, so would likely just need to know if it is possible to extract the code that ArcHydro uses to define the entire upstream catchment area of points. I can't seem to find that easily within the ArcGIS GUI.

Would anyone know of a way to identify/extract the code that ArcHydro is using to run "Batch Watershed Delineation", and if so would you also know how to call to ArcGIS to do that process without opening ArcGIS and running it from a command line?

Any ideas or suggestions would be greatly appreciated!

Thank you.

share|improve this question
1  
It's unlikely you will be able to produce a useful map from 250,000 (overlapping?) areas. This suggests you will be post-processing them for summary statistics such as their areas, mean slopes, or whatever. Perhaps there are more efficient algorithms that exploit spatial relationships among the pour points to obtain these final results. If you could describe the nature of your pour points and the ultimate objective of this analysis, you might get replies that are far more effective than merely speeding up the current procedure. –  whuber Jan 16 '12 at 15:16
    
I need to know the watershed areas for the points, its actually less than 250,000, I did some cleaning and its around 200,000. The points are intersections of two line intersections, and I need the watershed area of each point. Some of these points are close to each other, but they are all unique and we would like to determine the watershed area for each point. We will use the watershed area in a predictive model to distinguish a score for each point. I hope this is a more useful description. –  Steph Jan 17 '12 at 15:04
    
Run a FlowAccumulation calculation using a constant grid as input. (Set its values to the area of a single cell). Then simply read off its values at each of the 200,000 points. Fast and easy. –  whuber Jan 17 '12 at 15:09
    
I am not sure I get how this tells you the entire upstream area draining to the point. I tried running flow accumulation on a constant grid (with a value of 8100 as that is my grid cell area (90x90 cells)) and it returned a value of 0. Perhaps I need to predefine the boundaries? I am doing this for multiple watersheds, not just one. I also should have been more clear that I am interested in the total are draining to the point not just the immediate watershed area. –  Steph Jan 17 '12 at 16:28
    
"Total area draining to the point" is (obviously) equivalent to "total number of cells draining to the point" times "area of a cell." The former is precisely what FlowAccumulation calculates. It sounds like you need to work a little harder on getting FA to work correctly. Remember, it takes two inputs: one for the amount of water per cell and another to indicate the flow directions. The output will look like a network of streams; it cannot possibly be all zero when it's run correctly. –  whuber Jan 17 '12 at 17:46

1 Answer 1

In a conversation following the question, we refined the objective. It is to obtain

the watershed area of each point. Some of these points are close to each other, but they are all unique and we would like to determine the watershed area for each point. We will use the watershed area in a predictive model to distinguish a score for each point.

The proposed solution, which worked in this case (and was far faster than the batch watershed delineation), is to run a FlowAccumulation calculation using a constant grid as input. (Set its values to the area of a single cell). Then simply read off its values at each of the 200,000 points.

To understand this, note that the total area draining to a point is (obviously) equivalent to "total number of cells draining to the point" times "area of a cell." The former is precisely what FlowAccumulation calculates when it is given a unit grid as input.

An important insight here is that sometimes (frequently, in my experience) we can accomplish a compute-intensive task more efficiently by focusing on our ultimate objective, rather than on each specific technical step in a workflow, and attempting to identify an accurate and fast algorithm to reach that objective. Adding more processors, getting speedier disks, etc., can speed up a long operation, but only by a limited amount. Changing the algorithm altogether can improve it by orders of magnitude.

share|improve this answer

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.