distance_matrix function

Create a distance matrix between nodes for spatial models