lawn_random | R Documentation |
Generates random data-GeoJSON data, including data-Point's and data-Polygon's, for testing and experimentation
lawn_random( type = "points", n = 10, bbox = NULL, num_vertices = 10, max_radial_length = 10, max_length = 1e-04, max_rotation = pi/8 )
type |
Type of features desired: 'position', 'points', 'polygons', or 'lines' |
n |
(integer) Number of features to generate. |
bbox |
A bounding box inside of which geometries are placed. In the case of Point features, they are guaranteed to be within this bounds, while Polygon features have their centroid within the bounds. |
num_vertices |
(numeric) the number of vertices added to
polygon features. default: |
max_radial_length |
(numeric) The total number of decimal
degrees longitude or latitude that a polygon can extent outwards to
from its center. default: |
max_length |
(numeric) maximum number of decimal degrees that a
vertex can be from its predecessor. default: |
max_rotation |
(numeric) maximum number of radians that a line
segment can turn from the previous segment. default: |
A data-FeatureCollection
Other data functions:
lawn_featurecollection()
,
lawn_feature()
,
lawn_filter()
,
lawn_geometrycollection()
,
lawn_linestring()
,
lawn_multilinestring()
,
lawn_multipoint()
,
lawn_multipolygon()
,
lawn_point()
,
lawn_polygon()
,
lawn_remove()
,
lawn_sample()
## a position lawn_random("position") ## set of points lawn_random(n = 2) lawn_random(n = 10) ## set of polygons lawn_random('polygons', 2) lawn_random('polygons', 10) ## set of lines lawn_random('lines', 2) lawn_random('lines', 10) # with options lawn_random(bbox = c(-70, 40, -60, 60)) lawn_random(num_vertices = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.