I have two data sets both matrices of latitudes and longitudes.
$A = [(X,Y),(X_2,Y_2)]$
$B = [(X_3,Y_3),(X_4,Y_4),(X_5,Y_5)]$
They are of different sizes
I want to calculate by how much each of the pairs of (x,y) coordinates in A correlate with all of those in B.
So then can order A by those that correlate most closely with B.
I imagine it working a bit like B is used to create a heat map of the locations. So where there are more location clustered together in B the heat map has a higher value. Then each value of A is given a value based on what part of the heat map it is on.