This function is called by the resp_simplify module and simplifies the geometry data in an sf object

resp_simplify(shape, distance, logger = NULL)

Arguments

shape

sf. The sf object to be simplified

distance

numeric. The distance in meters to simplify the geometry by

logger

Stores all notification messages to be displayed in the Log Window. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL

Value

an sf object

Author

Simon Smart simon.smart@cantab.net

Examples

poly <- sf::st_polygon(list(rbind(
        c(0, 0), c(1, 0.25),
        c(2, 0), c(2.25, 1),
        c(2, 2), c(1, 2.25),
        c(0, 2), c(0.25, 1),
        c(0, 0))))
shape <- sf::st_sf(geometry = sf::st_sfc(poly))
simplified_shape <- resp_simplify(shape, 0.5)