This is Python solution for the QGIS Python console.
Just paste the code (after renaming "lines" to your line layer name) in the console.
It creates points every 100m along every single line feature in a line layer.
Depending on your data, points are located differently when a new line starts/ends (see the picture below). A solution could be to merge lines depending on IDs, etc..
from contextlib import contextmanager
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
import os
# silence stdout in QGIS Python console
@contextmanager
def silence_stdout():
new_target = open(os.devnull, "w")
old_target, sys.stdout = sys.stdout, new_target
try:
yield new_target
finally:
sys.stdout = old_target
l_layer = QgsMapLayerRegistry.instance().mapLayersByName('lines')[0]
p_lyr = QgsVectorLayer('Point', 'Points', 'memory')
QgsMapLayerRegistry.instance().addMapLayer(p_lyr)
pprov = p_lyr.dataProvider()
pprov.addAttributes([QgsField("sum", QVariant.Int)])
with silence_stdout():
for elem in l_layer.getFeatures():
sum = 0
while elem.geometry().length() > sum:
sum += 100 # here you can change the distance
geom_point = elem.geometry().interpolate(sum)
point_feat = QgsFeature()
point_feat.setGeometry(geom_point)
point_feat.setAttributes([sum])
pprov.addFeatures([point_feat])
p_lyr.updateExtents()
p_lyr.triggerRepaint()
p_lyr.updateFields()
