calc_distances#

calc_distances(latitudes, longitudes, verbose=False)[source]#

Calculate the pairwise distances between points given their latitudes and longitudes.

Parameters:
  • latitudes (ndarray) – A 1-dimensional array of latitudes.

  • longitudes (ndarray) – A 1-dimensional array of longitudes with the same shape as latitudes.

  • verbose (bool) – If True, prints the upper left corner of the distance matrix. Default is False.

Returns:

A 2-dimensional array where the element at [i, j] represents the distance between the i-th and j-th points.

Return type:

ndarray

Raises:

AssertionError – If latitudes is not 1-dimensional or if latitudes and longitudes do not have the same shape.