wkt_grob {wkutils} | R Documentation |
Generate grid geometries from well-known geometries
Description
Using wkt_meta()
and wkt_coords()
, these functions create graphical objects
using the grid package. Vectors that contain geometries of a single dimension
are efficiently packed into a grid::pointsGrob()
, grid::polylineGrob()
,
or grid::pathGrob()
. Vectors with mixed types and nested collections are encoded
less efficiently using a grid::gTree()
.
Usage
wkt_grob(
wkt,
...,
rule = "evenodd",
default.units = "native",
name = NULL,
vp = NULL
)
wkb_grob(
wkt,
...,
rule = "evenodd",
default.units = "native",
name = NULL,
vp = NULL
)
Arguments
wkt |
A character vector containing well-known text. |
... |
Graphical parameters passed to |
rule |
Use "winding" if polygon rings are correctly encoded with a winding direction. |
default.units |
Coordinate units, which may be defined by the viewport (see
|
name , vp |
Passed to |
Value
Examples
grid::grid.newpage()
grid::grid.draw(wkt_grob("POINT (0.5 0.5)", pch = 16, default.units = "npc"))