wkt_polygon: Random WKT polygon

View source: R/wkt_polygon.R

wkt_polygonR Documentation

Random WKT polygon

Description

Random WKT polygon

Usage

wkt_polygon(
  count = 1,
  num_vertices = 10,
  max_radial_length = 10,
  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_radial_length

(integer/numeric) maximum distance that a vertex can reach out of the center of the polygon. Units are in degrees latitude (Approximately 69 miles or 111 km). Default: 10

bbox

(integer/numeric) lat/long bounding box for the centers of the polygons, 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 POLYGON strings

Examples

wkt_polygon()
wkt_polygon(num_vertices = 3)
wkt_polygon(num_vertices = 4)
wkt_polygon(num_vertices = 100)
wkt_polygon(10)
wkt_polygon(bbox = c(50, 50, 60, 60))

ropensci/randgeo documentation built on Sept. 12, 2022, 2:01 p.m.