distance.Matrix: Distance matrix

View source: R/cdtSrcDistance_functions.R

distance.MatrixR Documentation

Distance matrix

Description

Distance matrix between two sets of points

Usage

distance.Matrix(x, y, spheric = FALSE)

Arguments

x

a 2 column matrix or data.frame (first column is longitude, second is latitude); or a SpatialPoints*, SpatialPixels* or SpatialGrid* object.

y

Same as x. If x is a Spatial object, y can take a different Spatial object other than x.

spheric

If FALSE (default), then a Cartesian distance will be computed. If set to TRUE, a spherical distance (using a standard great circle method) will be computed.

Value

Matrix of distances. The row represent y and the column x.


rijaf-iri/CDT documentation built on July 3, 2024, 2:54 a.m.