Skip to contents

Currently, this is not very efficient as the entire contents of the connection are read into R as a string and then the JSON parsed from there.

Usage

read_geojson_conn(conn, opts = list(), ...)

Arguments

conn

connection object. e.g. url('https://jsonplaceholder.typicode.com/todos/1')

opts

Named list of GeoJSON-specific options. Usually created with opts_read_geojson(). Default: empty list() to use the default options.

...

Any extra named options override those in GeoJSON-specific options - opts

Value

R object

Details

For uncompress geojson files it is faster to use read_geojson_file().

Examples

if (interactive()) {
  read_geojson_conn(gzfile("example.geojson.gz"))
}