powered by
Converts `sfc` objects to GeoJSON
sfc_geojson(sfc, digits = NULL)
simple feature collection object
integer specifying the number of decimal places to round numeric coordinates. numeric values are coorced using as.integer, which may round-down the value you supply. Default is NULL - no rounding
as.integer
NULL
vector of GeoJSON
# NOT RUN { library(sf) sf <- sf::st_sfc(list(sf::st_point(c(0,0)), sf::st_point(c(1,1)))) sfc_geojson(sf) # }
Run the code above in your browser using DataLab