Learn R Programming

lawn (version 0.1.7)

lawn_polygon: Create a polygon

Description

Create a polygon

Usage

lawn_polygon(rings, properties = NULL)

Arguments

rings
A list of LinearRings, or in json
properties
A list of properties

Value

a data-Polygon feature

See Also

Other data functions: lawn_featurecollection, lawn_filter, lawn_linestring, lawn_point, lawn_random, lawn_remove, lawn_sample

Examples

Run this code
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, properties = list(name = 'poly1', population = 400))

# Make a FeatureCollection
lawn_featurecollection(lawn_polygon(rings))

Run the code above in your browser using DataLab