geodesic distance moving to distance

Moving the geodesic distance computation to the distance matrix
derivation to avoid repeated computes.