3

With two layers, one multiline and one point, I need to split lines who intersect point layer.

In example (image), the selected line is unique but I need 11 lines cut at point level.

enter image description here

How can I do this with QGIS?

2
3

Using only QGIS native tools, you can convert the points to small, auxiliary lines, perpendicular to the line you want to split. Then use Split with lines.

To create the auxiliary lines, use this expression with Geometry by Expression on the line layer. Replace point (line 4) with the name of your point layer:

collect_geometries (
    array_foreach (
        aggregate( 
            'point', 
            'array_agg', 
            $geometry
        ),
        extend (
            make_line(
                line_interpolate_point( 
                    $geometry,
                    line_locate_point($geometry,@element)
                ),
            project (
                 line_interpolate_point( 
                    $geometry,
                    line_locate_point($geometry,@element)
                ),
                10,
                radians(
                    90+line_interpolate_angle( 
                        $geometry,
                        line_locate_point($geometry,@element)
            )))),
            10,
            0
)))

Use the newly created auxiliary lines to split the initial line into segments.

Screenshot: the small red auxiliary lines are created (here: with geometry generator) on the line-layer, based on the points. As you see from the colors, the line is then split at these points:

enter image description here

2

Let's assume there are two layers 'lines_test' (blue) and 'points_test' (orange), see image below.

input

Step 1. By means of the "Geometry by expression" with the following expression:

make_line($geometry, translate($geometry, 10, 10))

window

create tiny lines starting/ending at those points

step_1

On this step a smarter approach may be required, thus tiny lines should not overlap with initial lines. I would probably refer to these threads then: Perpendicular lines on line using QGIS and Creating line segments at point coordinates in QGIS.

Step 2. Use the "Split with lines" with the result from the Step 1 and get the final output

step_2

Not the answer you're looking for? Browse other questions tagged or ask your own question.