【转载】split / break polylines at point intersections
生活随笔
收集整理的這篇文章主要介紹了
【转载】split / break polylines at point intersections
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
關于如何將FeatureClass中線相互打斷的討論 - split / break polylines at point intersections
http://forums.esri.com/Thread.asp?c=93&f=1384&t=94285
ArcGIS Desktop - Geodatabase Topology forum | split / break polylines at point intersecti... ? | stephen eckhardt | May 23, 2003 |
| Re: split / break polylines at point inters... ? | Bradley Chopp | Sep 30, 2003 |
| Re: split / break polylines at point inters... ? | stephen eckhardt | Sep 30, 2003 |
| Re: split / break polylines at point inters... ? | Bradley Chopp | Sep 30, 2003 |
| Re: split / break polylines at point inters... ? | stephen eckhardt | Sep 30, 2003 |
| Re: split / break polylines at point inters... ? | Gourkishore Tripathy | Oct 06, 2003 |
| Re: split / break polylines at point inters... ? | tracy trople | Jan 15, 2004 |
| Re: split / break polylines at point inters... ? | Valentina Boycheva | Dec 20, 2004 |
| Re: split / break polylines at point inters... ? | Valentina Boycheva | Dec 20, 2004 |
| Re: split / break polylines at point inters... ? | Christie Johnson | Oct 04, 2004 |
| Re: split / break polylines at point inters... ? | Adriano Gomes | Dec 20, 2004 |
| ??Top?Print Reply Alert Moderator ?? | |
| split / break polylines at point intersections? | |
| stephen eckhardt? | |
| May 23, 2003? | |
| I thought this would be an easy task to accomplish automatically but I have yet to find a way to break lines where they intersect points. I'm using 8.3 and new features such as the planarize button are extremly helpful. But if they have that I'm not sure why they don't have a feature to do the same with lines and point. Does anyone know an easy way to accomplish this task. I have about 4000 points that intersect lines where the lines now need to be broken. I know I can set up a topology rule to find all these areas but is there a way to break all the line at once without going through each one individually. Any thoughts or suggestions?? | |
| Stephen Eckhardt GIS Analyst Civil Solutions? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Bradley Chopp? | |
| Sep 30, 2003? | |
| Stephen, Did you ever figure out this problem? I am coming across the exact same situation. I need to break my watermain polyline Feature Class where water valves(point FC) intersect. Any suggestions? I sure hope you didnt have to do that by hand! Thanks, Brad? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| stephen eckhardt? | |
| Sep 30, 2003? | |
| the answer i got from tech support was unless you write some specific code, yes you have to do it (split the lines at points)individually.? | |
| Stephen Eckhardt GIS Analyst Civil Solutions? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Bradley Chopp? | |
| Sep 30, 2003? | |
| A gentleman in the Data Editing forum gave me this code to split all lines in one layer by all points in another. Note: It works funny while in an edit session. So, it is better to NOT Start Editing when using this code. Brad? | |
| Sub SplitAll() Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument Dim pMap As IMap Set pMap = pMxDoc.FocusMap Dim pPointL As IFeatureLayer Set pPointL = pMap.Layer(0) 'point layer to split lines with Dim pLineL As IFeatureLayer Set pLineL = pMap.Layer(1) 'line layer to be split Dim pLineFC As IFeatureClass Set pLineFC = pLineL.FeatureClass Dim pPointFC As IFeatureClass Set pPointFC = pPointL.FeatureClass Dim pPointCursor As IFeatureCursor Set pPointCursor = pPointFC.Search(Nothing, False) Dim pPointF As IFeature Set pPointF = pPointCursor.NextFeature Do Until pPointF Is Nothing Dim pPoint As IPoint Set pPoint = pPointF.Shape Dim pSF As ISpatialFilter Set pSF = New SpatialFilter With pSF Set .Geometry = pPoint .GeometryField = "Shape" .SpatialRel = esriSpatialRelIntersects End With Dim pLineCursor As IFeatureCursor Set pLineCursor = pLineFC.Search(pSF, True) Dim pLineF As IFeature Set pLineF = pLineCursor.NextFeature Do Until pLineF Is Nothing Dim pPolyCurve As IPolycurve Set pPolyCurve = pLineF.Shape Dim pToPoint As IPoint Set pToPoint = pPolyCurve.ToPoint Dim pFromPoint As IPoint Set pFromPoint = pPolyCurve.FromPoint If (pFromPoint.x = pPoint.x And pFromPoint.y = pPoint.y) Then 'do nothing ElseIf (pToPoint.x = pPoint.x And pToPoint.y = pPoint.y) Then 'do nothing Else Dim pFeatureEdit As IFeatureEdit Set pFeatureEdit = pLineF pFeatureEdit.Split pPointF.Shape End If Set pLineF = pLineCursor.NextFeature Loop Set pPointF = pPointCursor.NextFeature Loop End Sub ? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| stephen eckhardt? | |
| Sep 30, 2003? | |
| Thanks, I'll try it out.? | |
| Stephen Eckhardt GIS Analyst Civil Solutions? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Gourkishore Tripathy? | |
| Oct 06, 2003? | |
| I am using the above code given by Prem, which I changed like this, keeping all other lines of code intact. Set pLineCursor = pLineFC.Search(pSF, False) One pre-condition is all your points (in point layer) must fall exactly on the polyines (in polyine layer). Otherwise, it will not split.? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| tracy trople? | |
| Jan 15, 2004? | |
| Do you know if it is possible to preform the above task with an point event theme and a geographic network line layer? I've tried this code with my data and it doesn't recognize the point event layer. I have saved the point layer as feature layer and it bails out when it tries to select a line. The error message says something like "no current recor".? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Valentina Boycheva? | |
| Dec 20, 2004? | |
| Tracy, Did you check whether your point layer and geographic network layer are in the same projection? The spatial operators and interfaces will usually fail if this is not true - with or without generating an error message.? | |
| Valentina Boycheva Senior GIS Programmer/Analyst http://www.jonesedmunds.com ? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Valentina Boycheva? | |
| Dec 20, 2004? | |
| Deleted duplicate post.? | |
| Valentina Boycheva Senior GIS Programmer/Analyst http://www.jonesedmunds.com ? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Christie Johnson? | |
| Oct 04, 2004? | |
| I ran the code, it says I have to be in an edit session. Istart an edit session, run the code, and it says there is no edit session in progress. Also, this line of code keep highlighting when I click debug: pFeatureEdit.Split pPointF.Shape I am doing something wrong, but what?? | |
| ? | |
| ??Top?Print Reply Alert Moderator ?? | |
| Re: split / break polylines at point intersections? | |
| Adriano Gomes? | |
| Dec 20, 2004? | |
| Can not execute this script too. My (.mxd) have first shape point and second shape lines. When execuute the scrist my Status Bar of ArcView "say" Create, Edit or Execute a VBA code... What is this? Thank. Adriano? | |
| Adriano Hantequeste Gomes SESP-GEAC? | |
轉載于:https://www.cnblogs.com/flyingfish/archive/2008/02/23/1078906.html
總結
以上是生活随笔為你收集整理的【转载】split / break polylines at point intersections的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 装系统不认硬盘
- 下一篇: C# 对象深拷贝、浅铐贝、直接拷贝(转)