Well, I'm not sure about the spatial join...
The objective is to number points along a line, from 1,2,3... Then, when a new line starts, number points along this line again with 1,2,3...
Almost all points snap to lines. There are points in the intersect between lines, but I can correct those with an attribute like line_id.
What's your idea?