# \donttest{
# Example data frame with coordinates
example_data <- data.frame(
sample_latitude_dd = c(59.3, 58.1, 57.5),
sample_longitude_dd = c(18.6, 17.5, 16.7)
)
# Report points on land with a 100 m buffer
report <- check_onland(example_data, report = TRUE, buffer = 100)
print(report)
# Plot all points colored by land/water
map <- check_onland(example_data, plot_leaflet = TRUE)
# Plot only bad points on land
map_bad <- check_onland(example_data, plot_leaflet = TRUE, only_bad = TRUE)
# Remove points on land by adding a buffer of 2000 m
ok <- check_onland(example_data, report = FALSE, buffer = 2000)
print(nrow(ok))
# }
Run the code above in your browser using DataLab