distance.Matrix: Distance matrix

Description Usage Arguments Value

View source: R/cdtUtilities_functions.R

Description

Distance matrix between two sets of points

Usage

1
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/CDTMergingF documentation built on May 4, 2020, 9:05 p.m.