Script to Trace Water Mains to Fire Hydrant

1356
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?

0 Kudos
7 Replies
JoeBorgione
MVP Emeritus

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 

That should just about do it....
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.

0 Kudos
JoeBorgione
MVP Emeritus

Perhaps, but that's beyond me.

That should just about do it....
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?

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 

0 Kudos
MatsHardy
Occasional Contributor

Many thanks for your help

0 Kudos