randgeo (version 0.3.0)

geo_linestring: Random GeoJSON linestring

Description

Random GeoJSON linestring

Usage

geo_linestring(count = 1, num_vertices = 10, max_length = 0.001,
  max_rotation = pi/8, bbox = NULL)

Arguments

count

(integer/numeric) number of Polygons. Default: 1

num_vertices

(integer/numeric) how many coordinates each polygon will contain. Default: 10

max_length

(integer/numeric) maximum distance that a vertex can be from its predecessor. Units are in degrees latitude (Approximately 69 miles or 111 km). Default: 0.001 (approximately 121 yards or 111 meters)

max_rotation

(integer/numeric) the maximum number of radians that a line segment can turn from the previous segment. Default: pi / 8

bbox

(integer/numeric) lat/long bounding box for the starting point of the line, numeric vector of the form west (long), south (lat), east (long), north (lat). optional

Value

GeoJSON; a list with one ore more Linestrings in a FeatureCollection, with class geo_list - simple unclass() to remove the class

Examples

Run this code
# NOT RUN {
geo_linestring()
geo_linestring(10)
geo_linestring(bbox = c(50, 50, 60, 60))
# }

Run the code above in your browser using DataLab