I want to add create nodes\points at an interval on a line shapefile let say at every 100 meters and save those points as shapefile.
I came across a plugin for Qgis called Qchainage, this exactly performs the task i want to do, but I am not sure how to adapt this plugin into my python script.
Best Answer
In PyQGIS you can use interpolate method from QgsGeometry to do that. Generated points can be stored as a memory layer. Complete example code is:
I tried it out with line shapefile of next image; where it is also observed memory point layer produced.
Editing Note:
A shorter code could be generated if you have installed in your system fiona and shapely python modules.
It produces same result layer (but it's saved in disk as shapefile; not as memory layer).