Select to view content in your preferred language

Tracing a trace network - starting points

217
0
04-10-2024 02:00 AM
Labels (2)
TorbjørnDalløkken2
Occasional Contributor

In one of my projects I have a point featureclass containing points which should be used for tracing a Trace Network. The trace network has simple edge. When looking at the documentation of the Trace-tool Trace (Trace Network) the parameter starting points needs to be a feature layer.

I've also created a pythonscript which does the tracing.

Steps in the pythonscript:

1. Selects two point features from the point featurelayer (featureclass)

2. Creates a FeatureLayer based on these to points

3. Runs the trace with the Trace tool

When running this script I get this error: ERROR 002512: Shortest path requires two starting points.

There are indeed selected two points and each point is snapped to the roads (edges). When adding an additional step to the script, that creates a featureclass containing the two points and creating the featurelayer based on this featureclass, it works.

Do I actually need to have a featureclass for the points in the shortest path analysis and not only a featurelayer based on a selection?

 

0 Kudos
0 Replies