1

I have a series of points along a road that I want to use to separate plots. I have tried using the point to line tool to create a line from these points using QGIS. However, it creates a single line with no attributes to separate each segment.

Is there a way to create separate lines for each segment (each straight section would be its own line)?

I started with the points. This is the line that I created. I would like the line between each point to be separate from each other line.

1
  • Can you add a screenshot showing the attribute table?
    – Bera
    Commented Nov 24, 2022 at 18:35

2 Answers 2

3

EDIT:

My earlier answer (following this edit) describes the use of the PointsToPaths tool, which has inexplicably been removed from the Plugins repository, after having been updated to 3.x (https://github.com/chiatt/pointstopaths). More's the pity.

Fortunately, however, there is a functionally equivalent alternative:

How to to create lines from points where the point attributes are transferred to the line segments?

Oprionally, if a user absolutely required the PointsToPaths tool, they could download a separate install of the last version of QGIS 2.x (2.18.28), and then install the 2.x version of the PointsToPaths plugin.

End of edit......

Use the QGIS PointsToPaths plugin (note the plural "paths"). It will create a separate line segment for each sequential pair of points. Additionally, each new line segment will contain the attributes from the two points that defined it. For details, see my answer at: Creating line layer from point layer with start and end attributes in QGIS

2
  • PointsToPaths apparently is not compatible with QGIS 3 and can't be installed in current versions of the app.
    – Kirkman14
    Commented Apr 11 at 14:35
  • @Kirkman14 Please see my updated answer.
    – Stu Smith
    Commented Apr 14 at 15:26
2

Using QGIS, you can use the Split Lines at Points tool. the tool is located under the Processing toolbox → SAGA → Feature - Lines → Split Lines at Points .

enter image description here

You need to use a small Epsilon value such as 0.001 to make sure the line will be split at each point

Before using the tool

enter image description here

After using the tool

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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