| lawn_multipolygon | R Documentation |
Create a multipolygon
lawn_multipolygon(coordinates, properties = NULL)
coordinates |
A list of LinearRings, or in json. |
properties |
A list of properties. |
A data-Feature<(data-MultiPolygon)>
Other data functions:
lawn_featurecollection(),
lawn_feature(),
lawn_filter(),
lawn_geometrycollection(),
lawn_linestring(),
lawn_multilinestring(),
lawn_multipoint(),
lawn_point(),
lawn_polygon(),
lawn_random(),
lawn_remove(),
lawn_sample()
rings <- list(
list(list(
c(-2.27, 53.46),
c(-2.27, 53.48),
c(-2.21, 53.48),
c(-2.21, 53.46),
c(-2.27, 53.46)
)),
list(list(
c(-4.27, 55.46),
c(-4.27, 55.48),
c(-4.21, 55.48),
c(-4.21, 55.46),
c(-4.27, 55.46)
))
)
lawn_multipolygon(rings)
lawn_multipolygon(rings, properties = list(name = 'poly1', population = 400))
x <- '[
[[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],
[[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],
[[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]
]'
lawn_multipolygon(x)
lawn_multipolygon("[[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]")
# Make a FeatureCollection
lawn_featurecollection(lawn_multipolygon(rings))
## Not run:
lawn_featurecollection(lawn_multipolygon(rings)) %>% view
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.