File: wkb_draw_points.Rd

package info (click to toggle)
r-cran-wkutils 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 816 kB
  • sloc: cpp: 3,625; sh: 12; makefile: 2
file content (79 lines) | stat: -rw-r--r-- 2,063 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/draw.R
\name{wkb_draw_points}
\alias{wkb_draw_points}
\alias{wkt_draw_points}
\alias{wkb_draw_lines}
\alias{wkt_draw_lines}
\alias{wkb_draw_polypath}
\alias{wkt_draw_polypath}
\alias{wkb_plot_new}
\alias{wkt_plot_new}
\title{Draw well-known geometries}
\usage{
wkb_draw_points(wkb, ...)

wkt_draw_points(wkt, ...)

wkb_draw_lines(wkb, ...)

wkt_draw_lines(wkt, ...)

wkb_draw_polypath(wkb, ..., rule = "evenodd")

wkt_draw_polypath(wkt, ..., rule = "evenodd")

wkb_plot_new(
  wkb,
  ...,
  asp = 1,
  xlab = "",
  ylab = "",
  main = deparse(substitute(wkb))
)

wkt_plot_new(
  wkt,
  ...,
  asp = 1,
  xlab = "",
  ylab = "",
  main = deparse(substitute(wkt))
)
}
\arguments{
\item{wkb}{A \code{list()} of \code{\link[=raw]{raw()}} vectors, such as that
returned by \code{sf::st_as_binary()}.}

\item{...}{Passed to \code{\link[graphics:points]{graphics::points()}},
\code{\link[graphics:lines]{graphics::lines()}}, or \code{\link[graphics:polypath]{graphics::polypath()}}}

\item{wkt}{A character vector containing well-known text.}

\item{rule}{Passed to \code{\link[graphics:polypath]{graphics::polypath()}}}

\item{asp, xlab, ylab, main}{Passed to \code{\link[graphics:plot.default]{graphics::plot()}} to
initialize a new plot.}
}
\value{
The input, invisibly
}
\description{
These functions send well-known geometry vectors to a
graphics device using \code{\link[graphics:points]{graphics::points()}},
\code{\link[graphics:lines]{graphics::lines()}}, and \code{\link[graphics:polypath]{graphics::polypath()}}. These are
minimal wrappers aimed at developers who need to visualize
test data: they do not check geometry type and are unlikely
to work with vectorized graphical parameters in \code{...}. Use
the \verb{wk*_plot_new()} functions to initialize a plot using the
extent of all coordinates in the vector.
}
\examples{
x <- "POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"

wkt_plot_new(x)
wkt_draw_polypath(x, col = "grey90")
wkt_draw_lines(x, col = "red")
wkt_draw_points(x)

}