Filter points within a tolerance distance
Source:R/filter-points-within-tolerance.R
filter_points_within_tolerance.Rd
This function filters points that are within a specified tolerance distance from a reference linestring.
Examples
# Create a points
points <- create_points(
0.000, 1.000, 0.500, 0.600, 1.000, 0.010, 1.500, 0.501, 2.000, 0.990
)
# Create a linestring
linestring <- create_linestring(0, 1, 1, 0, 2, 1)
# Plot the points
plot(linestring, col = "gray")
plot(points, add = TRUE)
# Filter points within a tolerance distance (default: 0.01)
filtered_points <- filter_points_within_tolerance(points, linestring)
# Plot the filtered points
plot(linestring, col = "gray")
plot(filtered_points, add = TRUE)