Convert a gh object into an sf object
gh_as_sf(data, ...) # S3 method for gh_route gh_as_sf(data, ..., geom_type = c("linestring", "point")) # S3 method for gh_spt gh_as_sf(data, ...) # S3 method for gh_isochrone gh_as_sf(data, ...)
data | A |
---|---|
... | ignored |
geom_type | Use |
if (FALSE) { start_point <- c(52.592204, 13.414307) end_point <- c(52.539614, 13.364868) route_sf <- gh_get_route(list(start_point, end_point)) %>% gh_as_sf() }