Select to view content in your preferred language

Using user-defined starting points as input when tracing

767
2
Jump to solution
07-13-2022 06:04 PM
GardenKo
New Contributor

Hello, I have a problem with creating user-defined starting point feature class and using it when tracing the shortest path via Arcpy. I tried to set the starting points along edges of network lines (which is high-voltage electric transmission lines) by making point feature class containing SHAPE@XY, FEATUREGLOBALID which is the GLOBALID from the line data. Saving this feature class in the geodatabase but outside the feature dataset where the Trace network locates, I tried to use it as an input starting points and traced the shortest path. However, the error below continues to annoy me. I am using ArcGIS Pro 2.9 and really want to figure out how to solve this problem. I am now searching for a clue for a full week and still no idea. 

 

Would appreciate if anyone can help me.

ERROR 001785: No valid starting locations found.
Failed to execute (Trace).

 

 

0 Kudos
1 Solution

Accepted Solutions
JonDeRose
Esri Contributor

@GardenKo I am sorry to hear of your frustration.  Are you working within a services based environment or single user geodatabase? 

When working with a trace network in a single user geodatabase (File GDB) the FEATUREGLOBALID field can be used but is not required. Instead, the geometry of the input feature class can be used to intersect the network feature's geometry and place starting points or barriers.  This is one approach you could take, but for this to work you would need to remove the FEATUREGLOBALID field from the class. 

When the FEATUREGLOBALID field is present you can create user-defined starting points and place these on line (edge) or point (junction) features with the corresponding network feature's GLOBALID as you specified; however, the issue you are encountering is due to the placement of the starting location on an edge feature... 

To use FEATUREGLOBALID for the placement of user-defined starting points and barriers on edge features we must also supply a PERCENTALONG field of type double.  This tells the trace the location of  the starting point or barrier along the edge.  When the PERCENTALONG field is not provided, the starting point/barrier is assumed to be a junction feature instead.

Please add a PERCENTALONG field (double) and provide a value between 0 and 1 or test removal of the FEATUREGLOBALID field to use the input class geometry to intersect the network feature's geometry 

This is an omission from the documentation that I will get addressed.  

Please let me know if you are still having issues after testing the above.  

Thanks, Jon 

View solution in original post

0 Kudos
2 Replies
JonDeRose
Esri Contributor

@GardenKo I am sorry to hear of your frustration.  Are you working within a services based environment or single user geodatabase? 

When working with a trace network in a single user geodatabase (File GDB) the FEATUREGLOBALID field can be used but is not required. Instead, the geometry of the input feature class can be used to intersect the network feature's geometry and place starting points or barriers.  This is one approach you could take, but for this to work you would need to remove the FEATUREGLOBALID field from the class. 

When the FEATUREGLOBALID field is present you can create user-defined starting points and place these on line (edge) or point (junction) features with the corresponding network feature's GLOBALID as you specified; however, the issue you are encountering is due to the placement of the starting location on an edge feature... 

To use FEATUREGLOBALID for the placement of user-defined starting points and barriers on edge features we must also supply a PERCENTALONG field of type double.  This tells the trace the location of  the starting point or barrier along the edge.  When the PERCENTALONG field is not provided, the starting point/barrier is assumed to be a junction feature instead.

Please add a PERCENTALONG field (double) and provide a value between 0 and 1 or test removal of the FEATUREGLOBALID field to use the input class geometry to intersect the network feature's geometry 

This is an omission from the documentation that I will get addressed.  

Please let me know if you are still having issues after testing the above.  

Thanks, Jon 

0 Kudos
GardenKo
New Contributor

Thank you so much for the reply.

I struggled to make both FEATUREGLODBALID and PERCENTALONG and still encountered an error when one of the starting points is on the junction that two lines meet (The error says only 2 starting points are required). So I tried the approach you told me and the codes got simpler and works better. Thank you!

0 Kudos