2

I have one layer with a network of lines and a second layer with its associated line and its distance along that line.

Is there a way to generate points for all these rows along their associated lines?

1

Tested on QGIS 3.6

You could create a Virtual Layer.

Assume your network of lines layer is called "Lines" and has a column named "Id". And the second layer is called "distances" with a column "LineId" for the associated line Id and a column "Chainage" for the distances along the lines.

Create a Virtual Layer with the query:

SELECT d.LineId,
       d.Chainage,
       Line_Interpolate_Point(l.geometry,d.Chainage) AS geom
FROM distances AS d
JOIN Lines AS l ON d.LineId=l.Id

This will give a new layer of points located along the lines with the attributes "LineId" and "Chainage".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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