文档介绍:;lassClsPathFinder{work;privateIMapm_ipMap;privateIPointCollectionm_ipPoints;privateIPointToEIDm_ipPointToEID;privatedoublem_dblPathCost=0;EID_Junctions;EID_Edges;privateIPolylinem_ipPolyline;#regionPublicFunction//etMap{set{m_ipMap=value;}get{returnm_ipMap;}}//work(IFeatureDatasetFeatureDataset){CloseWorkspace();if(!workAndMap(FeatureDataset))("打开出错");}//输入点的集合publicIPointCollectionStopPoints{set{m_ipPoints=value;}get{returnm_ipPoints;}}//路径成本publicdoublePathCost{get{returnm_dblPathCost;}}//返回路径publicIPolylinePathPolyLine(){IEIDInfoipEIDInfo;IGeometryipGeometry;if(m_ipPolyline!=null)returnm_ipPolyline;m_ipPolyline=newPolylineClass();IGeometryCollectionipNewGeometryColl=m_ipPolylineasIGeometryCollection;ISpatialReferenceipSpatialReference=;IEIDHelperipEIDHelper=newEIDHelperClass();=work;=ipSpatialReference;=true;IEnumEIDInfoipEnumEIDInfo=(EID_Edges);intcount=;();for(inti=0;i<count;i++){ipEIDInfo=();ipGeometry=;(ipGeometryasIGeometryCollection);}returnm_ipPolyline;}//解决路径publicvoidSolvePath(stringWeightName){try{intintEdgeUserClassID;intintEdgeUserID;intintEdgeUserSubID;intintEdgeID;IPointipFoundEdgePoint;doubledblEdgePercent;/*C#中使用*ITraceFlowSolverGEN替代ITraceFlowSolver*/ITraceFlowSolverGENipTraceFlowSolver=newTraceFlowSolverClass()asITraceFlowSolverGEN;Solver=Solver;work=work;=work;Elements=Elements;intintCount=;//定义一个边线旗数组IEdgeFlag[]pEdgeFlagList=newEdgeFlagClass[intCount];for(inti=0;i<intCount;i++){Flag=newEdgeFlagClass()Flag;IPointipEdgePoint=(i);//(ipEdgePoint,outintEdgeID,outipFoundEdgePoint,outdblEdgePercent);(intEdgeID,,outintEdgeUserClassID,outint