R/dataframe_to_geojson.R
dataframe_to_geojson.Rd
Take single points from geographical coordinates and convert it into a
geojson 'Polygon' string using st_buffer
.
dataframe_to_geojson(lonlat, dist = 0.00001, nQuadSegs = 2L, ...)
lonlat | a data.frame with geographical coordinates lonlat in that order |
---|---|
dist | numeric, buffer distance for all |
nQuadSegs | integer, number of segments per quadrant |
... | further arguments passed to |
An object of class 'geojson' for each row in lonlat
Other utility functions:
sf_to_geojson()
#>set.seed(123) lonlat <- data.frame(lon = runif(2, 10, 12), lat = runif(2, 45, 47)) gjson <- dataframe_to_geojson(lonlat) # }