Description Usage Arguments Value See Also Examples
Create a linestring
| 1 | lawn_linestring(coordinates, properties = NULL)
 | 
| coordinates | A list of positions. | 
| properties | A list of properties. | 
A data-Feature<(data-LineString)>
Other data functions: 
lawn_featurecollection(),
lawn_feature(),
lawn_filter(),
lawn_geometrycollection(),
lawn_multilinestring(),
lawn_multipoint(),
lawn_multipolygon(),
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 | linestring1 <- '[
   [-21.964416, 64.148203],
   [-21.956176, 64.141316],
   [-21.93901, 64.135924],
   [-21.927337, 64.136673]
]'
linestring2 <- '[
   [-21.929054, 64.127985],
   [-21.912918, 64.134726],
   [-21.916007, 64.141016],
   [-21.930084, 64.14446]
]'
lawn_linestring(linestring1)
lawn_linestring(linestring2)
pts <- list(
   c(-21.964416, 64.148203),
   c(-21.956176, 64.141316),
   c(-21.93901, 64.135924),
   c(-21.927337, 64.136673)
)
lawn_linestring(pts, properties = list(name = 'line1', distance = 145))
# completely non-sensical, but gets some data quickly
pts <- lawn_random()$features$geometry$coordinates
lawn_linestring(pts)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.