Snap a set of points to the closest points available in another set of points.
cpp_snap_points(data, ref, spatial_resolution)
A set of points to be snapped (a matrix). The result will have the same number of rows of this argument. Each row will return the respective snapped point.
A set of reference points (another matrix). The result will be a subset of this parameter.
The spatial resolution of data, which means that from each point of data it is possible to reach at least one point within data with distance equals or less than spatial_resolution.
A data.frame with the snapped points.