Description Usage Arguments Value
View source: R/data_extraction_functions.R
Function which calculates the distance to a closest spatial object. Anything that works with rgeos::gDistance will work in this function. loc will be reprojected to the projection of the lines.shapefile and the units will be of that projection.
1 | distanceToClosest(loc, lines.shapefile)
|
loc |
spatial object (with valid proj4string) |
lines.shapefile |
spatial object for which to calculate minimum distance |
data.frame with distance; named based on lines.shapefile input (units are assumed to be meters; if feet back transform output by 0.3048006096 m/ft)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.