# Calculating distance of individual points along line in PyQGIS? [closed]

I have a vector layer and need the distance between the points. This is an intermediate step for my further calculation and programming with Python. The starting point is stored in another layer (brown point). The order along the line is not known and must be determined from the distances between the points. Only the starting point is known and the order depending on the length of the point to the starting point must be determined. This step is still missing.

How exactly can I calculate the length of the points along the line with Python or QGIS and store it in an attribute table? • – artwork21 Sep 6 '19 at 18:41
• My problem is that I cannot determine the order of the points along the line. I didn't describe my problem correctly. You would somehow have to determine the smallest difference between the points and the starting point and then the difference between the 1st point after the starting point and the point with the smallest difference. I need a exact solution in code, but I don't know it. – Jannik1234 Sep 7 '19 at 8:55