hello, thanks a lot for the reply.

i am afraid that in my case i need to think about some other method for this similairity measure.

may be i need to describe more in details what i am doing. so i am writing a semestral work at uni. the topic is identification of archipelagos (groups of islands). my purpose is while grouping islands not just take into account spatial proximity between islands but also some characteristics of their shape (area, elongation, fractal dimension of coastline, compactness, concavity, ratio between small and big axeses of ellipse hull etc.).

so in first step, i measured all these parameters.

in second, calculated PCA based on these parmeteres.

in third, calculated similairity (euclidian distance between islands on PCA plot) between islands.

after in fourth step, (because what i want is that more similair islands (islands with smaller "PCA distance") need to become closer, and the ones with more distinct PCA scores to become further apart) i multiply the real distance between islands by that similairity coefficient ("PCA distance"), and based on this distance I make distance matrix.

in fifth step i do hierarchial agglomerative clustering with average-link distance method. and in this way i get archipelagos (groups of islands that are not that far from each other and similair in shape).

the results are not bad. similair to that, what i expected.

just i have two problems. first I am not sure that there are not better method to calculate similarities between islands than to calculate distance between their PCA scores.

and second i don't really know where to cut hierarchical tree automatically. of course, manually i can take a look at dendrogram and by intuition to guess at which height it would make sense to cut it.