Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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
Yes, that solved it. Please write it as an answer and I will gladly accept it :) – AndOne Apr 12 '11 at 14:51
up vote 4 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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