lawn_feature | R Documentation |
Create a Feature
lawn_feature(geometry, properties = c(), lint = FALSE)
geometry |
(character/json) Any geojson geometry. |
properties |
(list) list of properties, must be named |
lint |
(logical) Lint or not. Uses geojsonhint. Takes up increasing
time as the object to get linted increases in size, so probably use by
default for small objects, but not for large if you know they are good
geojson objects. Default: |
Other data functions:
lawn_featurecollection()
,
lawn_filter()
,
lawn_geometrycollection()
,
lawn_linestring()
,
lawn_multilinestring()
,
lawn_multipoint()
,
lawn_multipolygon()
,
lawn_point()
,
lawn_polygon()
,
lawn_random()
,
lawn_remove()
,
lawn_sample()
## Not run: # points ## single point pt <- '{"type":"Point","coordinates":[-75.343,39.984]}' lawn_feature(pt) ## with properties lawn_feature(pt, properties = list(foo = "bar")) ## many points in a list pts <- list( lawn_point(c(-75.343, 39.984))$geometry, lawn_point(c(-75.833, 39.284))$geometry, lawn_point(c(-75.534, 39.123))$geometry ) lapply(pts, lawn_feature) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.