splitNearDist: Fast Near Distance for Spatial* objects.

Description Usage Arguments Details Value

View source: R/splitNearDist.R

Description

splitNearDist splits Spatial* objects from the (sp) package using seqSPDF, and runs rgeos::gDistance() on the lists to obtain the nearest distance or nearest distance matrix. Behaves like NEAR in ArcGIS.

Usage

1
splitNearDist(input, near, sep = 1000, output = c("nearest", "matrix"))

Arguments

input

Spatial* object.

near

Spatial* object.

sep

Passed to seqSPDF(). Default set to 1000.

output

Return nearest distance or matrix of all combinations?

Details

This is a general wrapper for rgeos::gDistance() that allows for quicker nearer distance calculations and fixed a ram leak issue caused by large datasets when using the native rgeos function.

Value

Returns either a vector of the nearest distance of each input to the nearfeature or a matrix of all combinations.


jacpete/jpfxns documentation built on May 16, 2020, 5:02 a.m.