I am searching for a method for clustering spatial points along spatial lines. The points are connected to the lines.
I tried nearest neighbour clustering and gProject/gInterpolate from the rgeos package. As you can see in the image, both results have the same problem: the clustering along lines doesn't make sense. In the image below, the point colours visualize the different clusters.
Is there a solution in R or in QGIS to cluster the points by their location on a line/network?