Random WKT linestring

wkt_linestring(count = 1, num_vertices = 10, max_length = 1e-04,
  max_rotation = pi/8, bbox = NULL, fmt = 7)

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 number of decimal degrees (1 degree = approximately 69 miles or 111 km) that a vertex can be from its predecessor. Default: 0.0001

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

fmt

(integer/numeric) number of digits. Default: 7

Value

WKT; a character vector with one or more LINESTRING strings

Examples

wkt_linestring()
#> [1] "LINESTRING (168.1700870 55.8858673, 168.1701766 55.8858648, 168.1703489 55.8858805, 168.1703649 55.8858804, 168.1705204 55.8858709, 168.1705888 55.8858540, 168.1706489 55.8858436, 168.1708198 55.8858417, 168.1708551 55.8858436, 168.1708849 55.8858418)"
wkt_linestring(10)
#> [1] "LINESTRING (-98.4667213 -43.7156698, -98.4667177 -43.7156705, -98.4667158 -43.7156704, -98.4665888 -43.7156805, -98.4665385 -43.7156985, -98.4664720 -43.7157070, -98.4664717 -43.7157069, -98.4664384 -43.7157028, -98.4663659 -43.7156854, -98.4662871 -43.7156588)" #> [2] "LINESTRING (-66.1984177 -58.1074926, -66.1985278 -58.1074472, -66.1985244 -58.1073776, -66.1985232 -58.1073736, -66.1985309 -58.1072923, -66.1985252 -58.1072335, -66.1984850 -58.1071648, -66.1984571 -58.1071245, -66.1984803 -58.1070484, -66.1984776 -58.1070325)" #> [3] "LINESTRING (-35.4247179 85.3489474, -35.4244208 85.3488717, -35.4252474 85.3488361, -35.4247354 85.3488498, -35.4252647 85.3488522, -35.4241590 85.3488304, -35.4242741 85.3488315, -35.4237057 85.3488432, -35.4243571 85.3488534, -35.4240088 85.3488454)" #> [4] "LINESTRING (-99.0844460 -22.4474342, -99.0844338 -22.4474387, -99.0844670 -22.4474462, -99.0844150 -22.4474721, -99.0844191 -22.4474727, -99.0844108 -22.4474749, -99.0844885 -22.4475000, -99.0844771 -22.4475019, -99.0845105 -22.4475198, -99.0844497 -22.4475577)" #> [5] "LINESTRING (68.6588767 14.6656711, 68.6589004 14.6657451, 68.6588832 14.6657809, 68.6589250 14.6658428, 68.6589173 14.6658758, 68.6589227 14.6658857, 68.6589078 14.6659830, 68.6589053 14.6659966, 68.6588910 14.6660494, 68.6589011 14.6661385)" #> [6] "LINESTRING (-173.3286840 -44.5835389, -173.3286713 -44.5835738, -173.3286503 -44.5836600, -173.3286492 -44.5837012, -173.3286153 -44.5837822, -173.3286137 -44.5838218, -173.3285619 -44.5839095, -173.3285549 -44.5839309, -173.3285452 -44.5839473, -173.3285161 -44.5839805)" #> [7] "LINESTRING (145.3958461 26.5568972, 145.3958553 26.5569046, 145.3958827 26.5569520, 145.3959044 26.5570213, 145.3958939 26.5570880, 145.3958748 26.5571549, 145.3958505 26.5572300, 145.3958071 26.5573150, 145.3958056 26.5573182, 145.3957867 26.5573948)" #> [8] "LINESTRING (-79.0558032 42.0232731, -79.0557875 42.0232055, -79.0557912 42.0231968, -79.0557928 42.0231571, -79.0557753 42.0230840, -79.0557820 42.0230068, -79.0557385 42.0229320, -79.0557463 42.0228390, -79.0557463 42.0228135, -79.0557447 42.0227431)" #> [9] "LINESTRING (-177.2980007 -33.0121969, -177.2979805 -33.0122055, -177.2979577 -33.0122637, -177.2979600 -33.0123271, -177.2979582 -33.0123445, -177.2979485 -33.0124055, -177.2979286 -33.0124546, -177.2979173 -33.0125211, -177.2979103 -33.0125956, -177.2978978 -33.0126319)" #> [10] "LINESTRING (50.8980367 -81.2604912, 50.8985271 -81.2605441, 50.8986691 -81.2605542, 50.8991601 -81.2605549, 50.8995583 -81.2605657, 50.8999390 -81.2605662, 50.9000127 -81.2605640, 50.9003255 -81.2605547, 50.9008216 -81.2605562, 50.9013212 -81.2605592)"
wkt_linestring(num_vertices = 4)
#> [1] "LINESTRING (-103.3317135 -42.7288823, -103.3316788 -42.7289668, -103.3316458 -42.7290189, -103.3316682 -42.7291023)"
wkt_linestring(bbox = c(50, 50, 60, 60))
#> [1] "LINESTRING (54.3765506 53.0043521, 54.3766167 53.0043382, 54.3765866 53.0043343, 54.3767223 53.0043338, 54.3766356 53.0043440, 54.3766524 53.0043416, 54.3765116 53.0043441, 54.3765501 53.0043419, 54.3764820 53.0043531, 54.3765886 53.0043815)"