Description Usage Arguments Value See Also Examples
Create a multipolygon
1 | 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()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 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.