Learn R Programming

leafletR (version 0.2-1)

dfToGeoJSON: Internal function of toGeoJSON

Description

Create GeoJSON file from data frame

Usage

dfToGeoJSON(data, name, dest, lat.lon, overwrite)

Arguments

name
Name of the resulting GeoJSON file, as string.
dest
Directory the file shall be saved to, as string.
lat.lon
Names or indices of the columns in data containing the coordinates, as vector of two: c(latitude, longitude).
overwrite
TRUE overwrites existing files with the same name.

Value

  • GeoJSON file path, as string.

encoding

UTF-8

See Also

toGeoJSON