Skip to contents

g_summary() returns text summaries of WKB/WKT geometries. Requires GDAL >= 3.7.

Usage

g_summary(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 summaries for the corresponding geometies.

Examples

# Requires GDAL >= 3.7
if (as.integer(gdal_version()[2]) >= 3070000) {
  f <- system.file("extdata/ynp_fires_1984_2022.gpkg", package = "gdalraster")
  lyr <- new(GDALVector, f, "mtbs_perims")

  feat <- lyr$getNextFeature()
  g_summary(feat$geom)

  feat_set <- lyr$fetch(5)
  g_summary(feat_set$geom)

  lyr$close()
}