lawn_polygon | R Documentation |
Create a polygon
lawn_polygon(coordinates, properties = NULL)
coordinates |
A list of LinearRings, or in json. |
properties |
A list of properties. |
A data-Polygon feature.
Other data functions:
lawn_featurecollection()
,
lawn_feature()
,
lawn_filter()
,
lawn_geometrycollection()
,
lawn_linestring()
,
lawn_multilinestring()
,
lawn_multipoint()
,
lawn_multipolygon()
,
lawn_point()
,
lawn_random()
,
lawn_remove()
,
lawn_sample()
rings <- list(list( c(-2.275543, 53.464547), c(-2.275543, 53.489271), c(-2.215118, 53.489271), c(-2.215118, 53.464547), c(-2.275543, 53.464547) )) lawn_polygon(rings) lawn_polygon(rings, properties = list(name = 'poly1', population = 400)) # Make a FeatureCollection lawn_featurecollection(lawn_polygon(rings)) ## Not run: lawn_featurecollection(lawn_polygon(rings)) %>% view ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.