Select to view content in your preferred language

Determining Upstream and Downstream polylines

595
1
05-14-2013 07:53 AM
KevinYanuk
Deactivated User
Hello, 

I am looking for the best approach to determining the upstream and downstream polylines of two segments.

I have code that has just split a polyline into two segments:

ISet newSet = featureEditor.Split(_pointFeature);
IFeature newLine = (IFeature)newSet.Next();
while (newLine != null)
{
     // determine up / downstream?  or old / new sewer?
     newLine = (IFeature)newSet.Next();
}



Thanks!
0 Kudos
1 Reply
TerryGiles
Frequent Contributor
It's been a while but my recollection from dealing with street centerlines is that both resulting geometries would follow the direction of the origin polyline.  A polyline has a FromPoint and ToPoint which gives you an idea of the direction it is going.  If you need to know which is upstream for the other, check the new segments ToPoint & FromPoint... if lineA.FromPoint = LineB.ToPoint then Line B is 'upstream' (according to the original feature's direction).
0 Kudos