I'm looking for a way to programmatically identify polyline features which do not represent a 'simple' line from A to B but instead have several starting and/or end points. These are called complex network edges when working with geometric networks.

Why am I asking this? Because I have a geometric network with a feature class that is defined as only having simple network edges. But it somehow occurred that there are some 'bad' (i.e. complex) edges in there as well and I need to sort them out. Checking if the interface IComplexEdgeFeature is implemented doesn't work on the feature objects because by definition all features within that class are simple edges.

  • 1
    Please elaborate on what you mean by "bad". Do you mean multipart polylines? If so, did you try finding polylines where IGeometryCollection.Count > 1 ? – Kirk Kuykendall Apr 12 '11 at 13:28

Try finding all polylines where IGeometryCollection.GeometryCount > 1.

I think the example for calculating vertex count could be adapted to do this with the field calculator.


If the end points are not marked as such, you will have to find a definition that can unambiguously identify an end point. Depending on your geometry, that may be next to impossible, because an algorithm cannot tell whether the points

|  A B C D

represent a simple line


or a polyline


unless you have a clear criterion that can tell B-C is a bad edge.

If end points are marked, just choose a location in your algorithm where you have to iterate through all points anyway, and mark those geometries with more than two end points.

  • Are you claiming that ArcObjects cannot distinguish a disconnected polyline A-B C-D from the connected polyline A-B-C-D?? – whuber Apr 11 '11 at 15:10
  • Well, theoretically your answer would be correct, I guess. The point of my question was - how do I do it with ArcObjects without extensive geometric calculations. – AndOne Apr 11 '11 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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