BUG

INetworkJunction::EdgeCount() returns an incorrect value when the junction is at the endpoint of a self-looping feature

Last Published: April 25, 2020

Description

In ArcObjects, calling the INetworkJunction::EdgeCount() method on a junction at the end of a self-looping feature, a feature that has the same start and end vertex, returns the incorrect number of edges.

For example, if a junction was adjacent to only one edge such that both ends of the edge were adjacent to that junction, the EdgeCount() method will incorrectly return 2 when it should return 1, since there is only one edge adjacent to that junction.

Cause

The INetworkJunction::EdgeCount() method is incorrectly returning the cardinality of the junction, the number of different ways to enter or leave the junction, instead of the actual number of edges adjacent to the junction.

Workaround

If the network dataset contains self-looping edges, then it is possible to get the same edge element returned twice when querying the adjacent edges of the junction. Ensure the code handles this situation.

Article ID:000007799

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic