Write SF to geojson string

to_geojson_str(x, opts = list(), ...)

to_geojson_file(x, filename, opts = list(), ...)

Arguments

x

sf object. Supports sf or sfc

opts

named list of options. Usually created with to_geojson_opts(). Default: empty list() to use the default options.

...

any extra named options override those in opts

filename

filename

Value

character string containing json