Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.wk_wkt

Plot well-known geometry vectors


Description

Plot well-known geometry vectors

Usage

## S3 method for class 'wk_wkt'
plot(
  x,
  ...,
  asp = 1,
  bbox = NULL,
  xlab = "",
  ylab = "",
  rule = "evenodd",
  add = FALSE
)

## S3 method for class 'wk_wkb'
plot(
  x,
  ...,
  asp = 1,
  bbox = NULL,
  xlab = "",
  ylab = "",
  rule = "evenodd",
  add = FALSE
)

## S3 method for class 'wk_xy'
plot(x, ..., asp = 1, bbox = NULL, xlab = "", ylab = "", add = FALSE)

## S3 method for class 'wk_rct'
plot(x, ..., asp = 1, bbox = NULL, xlab = "", ylab = "", add = FALSE)

## S3 method for class 'wk_crc'
plot(x, ..., asp = 1, bbox = NULL, xlab = "", ylab = "", add = FALSE)

Arguments

x

A wkt() or wkb() vector.

...

Passed to plotting functions for features: graphics::points() for point and multipoint geometries, graphics::lines() for linestring and multilinestring geometries, and graphics::polypath() for polygon and multipolygon geometries.

asp

Passed to graphics::plot()

bbox

The limits of the plot in the form returned by wkt_ranges().

xlab

Passed to graphics::plot()

ylab

Passed to graphics::plot()

rule

The rule to use for filling polygons (see graphics::polypath())

add

Should a new plot be created, or should x be added to the existing plot?

Value

The input, invisibly.

Examples

# requires the wkutils package
if (requireNamespace("wkutils")) {
  plot(as_wkt("LINESTRING (0 0, 1 1)"))
  plot(as_wkb("LINESTRING (0 0, 1 1)"))
}

wk

Lightweight Well-Known Geometry Parsing

v0.4.1
MIT + file LICENSE
Authors
Dewey Dunnington [aut, cre] (<https://orcid.org/0000-0002-9415-4582>), Edzer Pebesma [aut] (<https://orcid.org/0000-0001-8049-7069>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.