title: Calculating distance of all the points in a region with each other
body: <p>I have a region with about 144 points. What i want to achieve is to measure the distance of a point with all others and store it in an array. I want to do this for all the points. If possible i would like to store this data in such a manner that there in no repetition. And i should be able to make queries like- All the distances between all the points without repetition, sum of all the distances for point no56 etc. </p>
  
  <p>I have a 3*144 array with two columns storing the coordinates of the points.</p>