如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
publicclassForm1:System.Windows.Forms.Form{IMappMap;IActiveViewpActiveView;……Form1LoadprivatevoidForm1_Load(objectsender,System.EventArgse){pMap=axMapControl1.Map;//pActiveView=pMapasIActiveView;//QIpActiveView.Extent=axMapControl1.FullExtent;//pActiveView.Refresh();//}axMapControl1MouseDownprivatevoidaxMapControl1_OnMouseDown(objectsender,ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMouseDownEvente){axMapControl1.MousePointer=ESRI.ArcGIS.Controls.esriControlsMousePointer.esriPointerCrosshair;CrosshairIEnvelopepEnv;pEnv=axMapControl1.TrackRectangle();//TrackRectanglepActiveView.Extent=pEnv;//pEnvpActiveView.Refresh();//}ArcEngine最短路径分析(源码)usingSystem;usingESRI.ArcGIS.Carto;usingESRI.ArcGIS.Geometry;usingESRI.ArcGIS.Geodatabase;usingESRI.ArcGIS.NetworkAnalysis;namespaceGisEditor{///<summary>///最短路径分析///</summary>publicclassClsPathFinder{privateIGeometricNetworkm_ipGeometricNetwork;privateIMapm_ipMap;privateIPointCollectionm_ipPoints;privateIPointToEIDm_ipPointToEID;privatedoublem_dblPathCost=0;privateIEnumNetEIDm_ipEnumNetEID_Junctions;privateIEnumNetEIDm_ipEnumNetEID_Edges;privateIPolylinem_ipPolyline;#regionPublicFunction//返回和设置当前地图publicIMapSetOrGetMap{set{m_ipMap=value;}get{returnm_ipMap;}}//打开几何数据集的网络工作空间publicvoidOpenFeatureDatasetNetwork(IFeatureDatasetFeatureDataset){CloseWorkspace();if(!InitializeNetworkAndMap(FeatureDataset))Console.WriteLine("打开network出错");}//输入点的集合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=m_ipMap.SpatialReference;IEIDHelperipEIDHelper=newEIDHelperClass();ipEIDHelper.GeometricNetwork=m_ipGeometricNetwork;i