powered by
Converts `sf` objects to GeoJSON
sf_geojson(sf, atomise = FALSE)
simple feature object
logical
vector of GeoJSON
# NOT RUN { library(sf) sf <- sf::st_sf(geometry = sf::st_sfc(list(sf::st_point(c(0,0)), sf::st_point(c(1,1))))) sf$id <- 1:2 sf_geojson(sf) sf_geojson(sf, atomise = T) # } # NOT RUN { # }
Run the code above in your browser using DataLab