prepareHazard <- function(shapefileOSM, shapefileHazard, dTol) {
sf <-
st_read(shapefileOSM, quiet = TRUE) %>%
st_transform(4326)
hazard <-
st_read(shapefileHazard, quiet = TRUE) %>%
st_make_valid() %>%
st_transform(27700) %>%
st_simplify(dTolerance = dTol) %>%
st_transform(4326)
cookieCutter(sf = sf, sfToCut = hazard) %>% as_tibble %>% st_as_sf %>% select(geometry)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.