identify the nearest gages downstream from dams

4787
18
06-15-2016 07:55 AM
Labels (1)
XianyingFan
New Contributor II

Help please:

Task: identify the nearest gages downstream from dams

Data: Stream Flowline (line feature class), streamgage point feature class, dam point feature class (both point feature classes contain thousands of points)

What I did: Using geometric network analysis tools to first create a geometric network, then set flow direction and finally trace geometric network, I got the output of a group layer.

My questions: I am hoping to add a new field which contains the ID of the nearest gage point for each dam point in my dam point attribute table, is that possible to realize this using the output of tracing geometric network? How can I realize it?

Thank you so much!

Maggie

0 Kudos
18 Replies
BillDaigle
Occasional Contributor III

Been a while since I have done this.  It is certainly possible.  Conceptually, you will want to add all of your dams as flags (starting points) and gauges as barriers (end points). When you run the analysis, you will get an output of lines for each set of start and end points.  I believe you can join the line output back to the dam feature class if you want to populate the downstream gauge id. 

XianyingFan
New Contributor II

Thank you so much for your reply Bill!

Do you mean to join the line output with the original dam feature class? How can I get the closest downstream gauge id and add it to dam's attribute table?

So you've done this to identify the nearest downstream points for many upstream points in one time and we don't need to use python to automate?

0 Kudos
BillDaigle
Occasional Contributor III

Yes, you should be able to do this without python.  I think it is quite simple once you figure out how to add all of the flags and barriers at one time.  I think if you select all of the dams there is an option to add then all as flags, then you can do the same with gauges as barriers. 

The table for the output lines should have a should have a field with the OID (or FID) for the dam and the OID (or FID) for the associated gauge.  You may need to fiddle with analysis setting so it only find the first (closest) barrier. 

XianyingFan
New Contributor II

Yes, I am able to select all of the dams points and gauges points with tracing geometric network tool. Do you mean all the information are contained in the output lines attribution table, including the ID(OID or FID) of dams as well as gauges? The computer I am using now has no ArcMap, I will try later. Can I ask you if I have further questions later? Thank you so much Bill!!

0 Kudos
BillDaigle
Occasional Contributor III

Yes, the info you’ll need should be in the attribution table. I will do what I can to help. I haven’t done it in a while.

XianyingFan
New Contributor II

Hi Bill, I use "trace geometric network" tool and set the dam points as flags, the gage points as barriers, I also disable gage point feature class so that it will stop trace when there is gage point. Then I limit the results to features stopping the trace. The output I get are the layers with selection features. Then I create layers from the selected features for both dam and gage point feature classes. But from the result I don't know which gage point are paired with dam point(nearest along the streamline) and what should I do next so that the nearest ID of gage point can appear in dam point attribution table.

Can you please recall which tools you used to realize the task? Is there any record available as my reference? May I write email to you or call you directly if possible? Thank you so much!

Maggie

0 Kudos
BillDaigle
Occasional Contributor III

Hey Maggie

Now it’s coming back to me. It’s the network analyst toolset (instead of the geometric network tools…very confusing) that return an attribute table instead of a selection. The network analyst tools are designed for working with road networks, but also work for stream networks.

From here it seems like you have 2 options:

1. Use python or model builder to iteratively select each dam and run a the trace tool with one dam selected at a time.

2. Build a network dataset and use those tools.

From what I remember, setting up the other type of network dataset was significantly more complicated, but the tools are little more robust. Personally, I think I would lean towards option 1.

0 Kudos
XianyingFan
New Contributor II

Thanks a lot, Bill!

If using network analyst toolset, how can we set the flow direction? Is there a tracing tool under network analyst toolset? I can't find it.

Which option did you do to get the result? Option 1? Do you have more details? Can you share with me the python script? Since there are many dam points, we have to use loop, right? I just started learning python recently and it's so difficult for me to write script with no bugs....Thank you so much for your help!

Maggie

0 Kudos
XianyingFan
New Contributor II

Hi Bill, did you see my last comment? I tried to build network dataset, however, I encounter an error: "Network was build, but with some errors. The network can still be used in analysis, however the invalid features will not participate in the network", when I opened the "show build errors", I found that all my dam and gage points are listed there, so those points weren't able to participate in the network. Did you encounter this problem before?

0 Kudos