I have a network dataset with roads and junctions.

I am wondering what class I can use in ArcPy to extract FromJunctionId and the ToJunctionId for each road segment in the network dataset.

  • Does not the road segment a polyline?
    – Emi
    Jan 19, 2013 at 13:59

2 Answers 2


You need to create topology rules where input feature class operations equal output feature class operations where you are creating true nodes and filtering out false nodes.

A feature similar is point intersection. You could also create a convex hull to incorporate your to and from edges, (not segments) where the true node is all positive and negative edge (to-from) pairs contained by points following programmetric rules centred on a central point within the the topologic figure which would function as the lat long of the true node.

A secondary operation could associate street names or classes with associated pairs as a name feature class and could be programmaticaly linked to create an routing association using either and nor loops associating names and node associations for the purpose of determining the two and from segments or nodes.

Points and lines and value schemas would seem useful as a more specific answer to the way your question is posed.

  1. get polyline from road feature
  2. read polyline's firstPoint and lastPoint

these first point and last point are the toJunctionId and fromJunctionId. To know more about polyline properties you may read this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.