Script to Trace Water Mains to Fire Hydrant

247
7
06-03-2020 08:44 PM
MatsHardy
Occasional Contributor

I have a line feature class of water mains and another point feature class of fire hydrants. The water mains are inter-connected and the fire hydrants are connected to the tips of the water mains.

Now, I wants trace from a water mains feature to all connected fire hydrants. Are there any functions in arcpy allow me to do so?

Reply
0 Kudos
7 Replies
JoeBorgione
MVP Esteemed Contributor

You might be out of luck if you are strictly an ArcGis Pro user:  This idea post is a coule years old and indicates that geometric network traces are an ArcMap only sort of thing: Support for Geometric Networks in Pro 

 

If your are an ArcMap user, start here: What are geometric networks?—Help | Documentation 

can't wait to retire....
MatsHardy
Occasional Contributor

Thanks to your help. But am I able to do the same things without geometric network? My company does not allow building network in geodatabase.

Reply
0 Kudos
JoeBorgione
MVP Esteemed Contributor

Perhaps, but that's beyond me.

can't wait to retire....
Reply
0 Kudos
CodyScott
Occasional Contributor

In a more advanced way (partially arcpy) you could implement Dijkstra algorithm to check the data in a non geometric network. 

without doing any searching there might be an existing python implementation already you could use. If not the algorithm is pretty straightforward. 

Dijkstra's algorithm - Wikipedia 

MatsHardy
Occasional Contributor

Thanks for your help. I am looking for arcpy scripts to search point features snapped on line features. Do you any arcpy functions to do so?

Reply
0 Kudos
CodyScott
Occasional Contributor

try this out. You can modify it to however you'd like once you download it.

GitHub - namur007/arcgis_dijkstra: Dijkstra shortest path python toolbox for ArcGIS 

Reply
0 Kudos
MatsHardy
Occasional Contributor

Many thanks for your help

Reply
0 Kudos