I have a line shapefile showing the street network for a major city in Africa. For each line segment, I want to calculate the total number of roads/streets connected to it. For example, the road highlighted in red is a line segment with 4 roads connected to it. How do perform this for all line segments in QGIS?
1 Answer
You can get line intersections.This video shows line intersactions tool. Number of intersection points on line is the number of roads connected to that road. You can use spatial join to count points on line Count number of points per line in QGIS .
-
Thank you very much for the help, and for directing my attention to the other tutorials! Apr 16, 2018 at 13:04
-
Sorry to disturb you but do you know any efficient approach to classify a line segment having a dead-end in QGIS? Apr 16, 2018 at 13:18
-
May be there is a simpler solution but I'd try as: 1. Vector -> Geometry Tools -> Extract Nodes(get all nodes) 2. Spatial join extracted nodes with source data. 3. Nodes that are on single line are dead-end nodes. 4. Lİne segment that has same segment_id with result of 4 is a segment with dead end. Apr 16, 2018 at 13:52
-