Network flow trace with measures / distance

Discussion created by spiskulaesriuk-esridist Employee on Jun 14, 2012
Latest reply on Jun 15, 2012 by spiskulaesriuk-esridist

I wrote a tool that finds upstream and downstream trace in a river network from a start point X. This is based on a network flag for the point X. The network has defined flow direction/sinks. Now there is a requirement to find the distance of objects laying along the network (trace result in particular) to the point X. Is it possible for the network solver to add M Values to the resulting geometries? For example it would be enough if all the M Values would indicate how far a given FromPoint or ToPoint of the returned edge is from the end (last sink) of the whole 'branch'  of the river.  I''ve programmatically added  weights to the solver:

INetSchema netSchema = m_geometricNetwork.Network as INetSchema;
INetSolverWeightsGEN netSolverWeights = m_traceFlowSolver as INetSolverWeightsGEN;

INetWeight netWeight = netSchema.get_WeightByName("Distance");
netSolverWeights.FromToEdgeFilterWeight = netWeight;
netSolverWeights.ToFromEdgeFilterWeight = netWeight;

but the results have no measures.  Any suggestions?