Create example geometry objects

wk_example(which = "nc", crs = NA, geodesic = FALSE)

wk_example_wkt

Format

An object of class list of length 29.

Arguments

which

An example name. Valid example names are

  • "nc" (data derived from the sf package)

  • "point", "linestring", "polygon", "multipoint", "multilinestring", "multipolygon", "geometrycollection"

  • One of the above with the "_z", "_m", or "_zm" suffix.

crs

An object that can be interpreted as a CRS

geodesic

TRUE if edges must be interpolated as geodesics when coordinates are spherical, FALSE otherwise.

Value

A wkt() with the specified example.

Examples

wk_example("polygon")
#> <wk_wkt[4]>
#> [1] POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))          
#> [2] POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30...
#> [3] POLYGON EMPTY                                          
#> [4] <null feature>