lawn_geometrycollection: Create a geometrycollection

Description Usage Arguments Value See Also Examples

View source: R/geometrycollection.R

Description

Create a geometrycollection

Usage

1
lawn_geometrycollection(coordinates, properties = NULL)

Arguments

coordinates

A list of GeoJSON geometries, or in json.

properties

A list of properties.

Value

A data-GeometryCollection feature.

See Also

Other data functions: lawn_featurecollection(), lawn_feature(), lawn_filter(), lawn_linestring(), lawn_multilinestring(), lawn_multipoint(), lawn_multipolygon(), lawn_point(), lawn_polygon(), lawn_random(), lawn_remove(), lawn_sample()

Examples

 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
x <- list(
  list(
    type = "Point",
    coordinates = list(
     list(100, 0)
    )
  ),
  list(
    type = "LineString",
    coordinates = list(
     list(100, 0),
     list(102, 1)
    )
  )
)
lawn_geometrycollection(x)
lawn_geometrycollection(x,
  properties = list(city = 'Los Angeles', population = 400))

x <- '[
   {
     "type": "Point",
     "coordinates": [100.0, 0.0]
   },
   {
     "type": "LineString",
     "coordinates": [ [101.0, 0.0], [102.0, 1.0] ]
   }
]'
lawn_geometrycollection(x)

lawn documentation built on Jan. 6, 2021, 5:07 p.m.