plot_geom: Plot WKT or WKB geometries

View source: R/display.R

plot_geomR Documentation

Plot WKT or WKB geometries

Description

plot_geom() plots one or more geometries given as either WKT or WKB raw vectors, using wk::wk_plot().

Usage

plot_geom(x, xlab = "x", ylab = "y", main = "", ...)

Arguments

x

Either a character vector containing one or more WKT strings, a raw vector of WKB, or a list of WKB raw vectors.

xlab

Title for the x axis.

ylab

Title for the y axis.

main

The main title (on top).

...

Optional arguments passed to wk::wk_plot().

Value

The input, invisibly.

Examples

# a Delaunay triangulation of 10 random points
set.seed(4)
x <- sample.int(100, 10)
y <- sample.int(100, 10)

g <- g_create("MULTIPOINT", cbind(x, y))
g_wk2wk(g)

plot_geom(g)

g2 <- g_delaunay_triangulation(g)
g_wk2wk(g2)

plot_geom(g2, add = TRUE)

gdalraster documentation built on Nov. 19, 2025, 9:07 a.m.