I have a line layer that is actually buffer polygons converted to a line layer. I would like to generate points at all places where 3 or more lines intersect. I would settle for places where 2 or more lines intersect. I know that this is possible to do if all the lines were different layers. What I need is a method to do this when all the lines are contained in a single shapefile. There are too many lines to separate them into individual files.
Asked
Active
Viewed 1,245 times
3
-
Related post if you're open to scripting: Intersecting lines get crossings – ArMoraer May 25 '16 at 15:59
-
I'll take a look, though scripting is not my forte. – Kingfisher May 25 '16 at 16:08
2 Answers
3
You could do it in three (or four) steps:
(1) Create nodes at intersections
Processing Toolbox | GRASS | Vector | v.clean and select break option.
(2) Extract nodes as points layer.
Processing Toolbox | QGIS geoalgorithms | Vector geomerty tools | Extract nodes
(3) Only keep duplicated points (Nodes)
- Open attribute table of
Nodes(output ofExtract nodestool) - Give an expression:
count( "id", group_by:= geom_to_wkt($geometry))...assuming you have anidfield. - Remove features whose count is only 1 (one).
(4: optional) Remove duplicates (e.g. Delete duplicate geometries tool...)
Kazuhito
- 30,746
- 5
- 69
- 149
0
Yes, use the line intersections tool from the Vector drop-down menu. Choose Analysis Tools and then Line Intersections.
-
2This is an answer for separate shapefiles, I don't think this tool works for intersections within the same shapefile. – Louis May 08 '17 at 15:08
-
Yes this won't work for me since the lines are all in the same file. – Kingfisher May 08 '17 at 15:26
