
Compute pairwise haversine distances between grid cells
Source:R/dependence_empirical.R
hm_distance_matrix.RdReturns a symmetric \(N \times N\) distance matrix of great-circle distances in kilometres between all pairs of land cells (Eq. 5 of Clavijo Mesa et al., 2026, SF paper).
References
Clavijo Mesa, M.V., Broggi, M., Di Maio, F. & Zio, E. (2026). International Journal of Disaster Risk Reduction, 141, 106172.
Examples
if (FALSE) { # \dontrun{
X_land <- hm_filter_land_cells(X)
D <- hm_distance_matrix(attr(X_land, "coords"))
range(D)
} # }