Learn R Programming

geojsonsf (version 1.1)

sfc_geojson: sfc to GeoJSON

Description

Converts `sfc` objects to GeoJSON

Usage

sfc_geojson(sfc)

Arguments

sfc

simple feature collection object

Value

vector of GeoJSON

Examples

Run this code
# 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