geo_write {geojson}R Documentation

Write geojson to disk

Description

Write geojson to disk

Usage

geo_write(x, file)

Arguments

x

input, an object of class geojson

file

(character) a file path, or connection

Details

Wrapper around jsonlite::toJSON() and cat

Examples

file <- tempfile(fileext = ".geojson")
geo_write(
  point('{ "type": "Point", "coordinates": [100.0, 0.0] }'),
  file
)
readLines(file)
unlink(file)

[Package geojson version 0.3.5 Index]