distance_matrix_geographic: Compute distance matrix for geographic CRS using...

View source: R/distance.R

distance_matrix_geographicR Documentation

Compute distance matrix for geographic CRS using sf::st_distance

Description

Internal function that uses sf::st_distance() for accurate great circle distances on geographic (longlat) coordinate systems.

Usage

distance_matrix_geographic(x, y = NULL, use_centroids = NULL)

Arguments

x

An sf object

y

An sf object or NULL

use_centroids

Logical. If TRUE, use polygon centroids.

Value

A numeric matrix of distances in meters.


spopt documentation built on April 22, 2026, 9:07 a.m.