get_one_to_one_distance: Load 1 sf object which contains the spatial feature of both...

Description Usage Arguments Value

View source: R/get_one_to_one_distance.R

Description

This function will calculate the distance between the 2 spatial features in each row

Usage

1
2
3
4
5
6
7
get_one_to_one_distance(
  x,
  x_geom = "geometry.x",
  y_geom = "geometry.y",
  splits = 50,
  centroid = TRUE
)

Arguments

x

The sf object with both the x geometry and the y geometry

x_geom

The geometry of the object on the lhs

y_geom

The geometry of the object on the rhs

splits

The number of lists so as to speed up the calculation

centroid

Default is TRUE. If TRUE, convert x_geom and y_geom to centroids

Value

Returns the sf object with additional column, geom_distance_m in meters


tayoso2/sfXtra documentation built on Dec. 23, 2021, 7:50 a.m.