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?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
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