I have a number of multipoint features that form lines (hiking trails). I would like to connect the dots of each multipoint feature to generate line features, but there are no attributes with which to sort the points in the correct order. The trails vary quite a bit in shape and direction so I can't assign an id from West to East for example.

Is there any way to accomplish this other than manually tracing the lines on top of the points? The main tools at my disposal are FME Professional Edition and QGIS.

  • 1
    A line is an ordered list of vertices. If you have no information about the true order, you will likely need a great deal of intelligence to discern an order, and a rigorous review process to verify that the job was done correctly. This will not be an inexpensive undertaking.
    – Vince
    Nov 20, 2015 at 11:44

1 Answer 1


I wouldn't say it's a hopeless task. After all, these aren't random points - you know they are going to form a linear feature.

I spent about 10 minutes with FME - using a dataset of a trail sorted into a random order - and think the NeighborPairFinder transformer is your friend here.

enter image description here

It works because for each point on the trail you find the two nearest neighboring points. This transformer creates a vector to each. Then just run them through a LineJoiner to join it all together.

enter image description here

The result is not perfect. I can see gaps for sure. And I would bet money that there are issues where there is a sharp turn (the nearest neighbor is not the next point but one backtracking). But still, I think it's a good start. Messing about with the settings in the NeighborPairFinder might help (you get to specify a minimum separation angle).

Hope this helps!

  • Interesting! Seems like this could work actually. I get some of the lines joined, but most of them remain unmatched. Could you perhaps screenshot the settings you're using on the pairfinder and linejoiner?
    – hexamon
    Nov 24, 2015 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.