How to rank polylines according to their similarity to a ref polyline?

enter image description here

Update 1: simulations show that simple $\sqrt{\sum{(case-ref)^2}}$ can find better similarity between polylines (as set of points) than Hausdorff distance! but not satisfied yet! (right-click >> view image >> for full resolution)

enter image description here


Given your description, there are a few measures that you could use. If the data is time varying (i.e. those polylines are really tracks and you are comparing them to a reference route), you could use something like a simple root-sum-squares to get a good measure.

A more "geo" approach, then Hausdorff distance is a good metric. Its supported in GEOS and JTS, so lots of free software tools (e.g. postgis and spatialite) support it using simple function calls. It may not be a great approach if you have a track that has a lot of "fairly large" excursions, and another track that has one huge excursion and is otherwise pretty good.

You may also want to apply some filtering to this data if its recorded from noisy sensors - a momentary recording "glitch" could make a lot of difference in this kind of "reduce to a single number" assessment.

  • what are you meaning with root-sum-squares? – nkint Apr 17 '13 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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