I inherited a line shapefile in ArcMap that is used to represent a road network. The problem is that the road network is pretty large and it is impossible for me to:
- Tell if the end of each line (road segments) is "connected" to either an edge, vertex, or the end of another line (road segment); and
- Tell if the entire road network is "connected" - i.e., can I trace a route from any point on the road network to any other point on the road network?
Is there a way to accomplish this in ArcMap? That is, is there a function that will allow me to highlight line segments that do no connect to other line segments, or something similar that would allow me to answer the two questions above?
Answer
Yes, but sort of. ArcGis no longer has line-node topology that enables the user to tell how many arcs (lines) are connected at their ends (nodes).
To check is one thing, but how about to fix instead? If you open the feature class in ArcMap and then use planarize lines (give a tolerance) and the lines will be snapped and split at intersection - saves a lot of work. If you don't want to split the lines then consider the tool Integrate but be careful to use a very small tolerance, it will snap the ends together but can make the lines also snap together. Before using Integrate keep a backup as it can destroy your data!
Now, to find disconnected ends use Feature Vertices to Points to get the end points and then Collect Events which will give you a feature class with the number of end points present, at this stage any event of 1 is suspect so you will need to separate these out.
To work out if it should be connected is the next task, use Generate Near Table (again with a suitable tolerance) and option of closest = ALL using the events with a count of 1 against the original lines, then using Summary Statistics you can find for each point the count of records using the IN_FID as a case field and NEAR_FID as a statistics field with a statistic type of "COUNT".
To make like easier extract from the near table the records with a distance greater than 0 using Table Select. Each event will find the line that generated it but the distance will be 0, if it is attached properly to another line (at a vertex) the distance will also be 0, so now any event that has a record remaining in the near table is possibly disjoint but these will need to be viewed manually.
No comments:
Post a Comment