I have two data sets. One is points in the blue curve. The other is points in the green curve. Now I want to find a property (P) or something else like index that has the following characteristics:

  1. It represents the similarity between two data sets. (With similarity I am referring to the same shapes plot by these points of two data sets)
  2. It doesn't depend on the scale. Two shapes have the same shape but different scale still give the same P value.

Could you suggest what P should I consider? enter image description here

  • Would Hausdorff Distance give you what you want? It's implemented in PostGIS.
    – Rob Skelly
    Aug 6, 2015 at 15:36
  • I just read about Hausdorff Distance. It is great but also there is a problem. It depends on the scale.
    – user56332
    Aug 6, 2015 at 15:46

1 Answer 1


I've tried to use affine transformation to match shapes and used, area of symmetric difference between target and match shapes (D) to calculate

P = 1 - D/AreaOfShapeToMatch:

enter image description here

Result looks like this:

enter image description here

To find transformation coefficients using least squares technique shouldn't be a challenge if you know how to match points.

You cannot use this technique to compare triangles, because any 2 will match. The same with rectangular shapes. Rectangle will match square.

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.