Skip to contents

g_name() returns geometry type names in well known text format.

Usage

g_name(geom, quiet = FALSE)

Arguments

geom

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

quiet

Logical, TRUE to suppress warnings. Defaults to FALSE.

Value

character vector of the same length as the number of input geometries in geom, containing the WKT names for the corresponding geometies.

Examples

elev_file <- system.file("extdata/storml_elev.tif", package="gdalraster")
ds <- new(GDALRaster, elev_file)
bbox_to_wkt(ds$bbox()) |> g_name()
#> [1] "POLYGON"
ds$close()