geo_write: Write geojson to disk

View source: R/geo_write.R

geo_writeR 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)

ropensci/geojson documentation built on Aug. 23, 2023, 10:30 a.m.