1 / 14
文档名称:

ArcGIS Engine+最短路径分析(C#源码).doc

格式:doc   大小:32KB   页数:14页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

ArcGIS Engine+最短路径分析(C#源码).doc

上传人:文库旗舰店 2019/10/10 文件大小:32 KB

下载得到文件列表

ArcGIS Engine+最短路径分析(C#源码).doc

文档介绍

文档介绍:;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