gdal_polygonizeR: Polygonize a raster

View source: R/GIS.R

gdal_polygonizeRR Documentation

Polygonize a raster

Description

Polygonize a raster

Usage

gdal_polygonizeR(
  x,
  outshape = NULL,
  gdalformat = "ESRI Shapefile",
  pypath = NULL,
  readpoly = TRUE,
  quiet = TRUE
)

Arguments

x

a RasterLayer, SpatRaster, or character giving the filepath to a raster.

outshape

character giving the filepath for the output shapefile.

gdalformat

GDAL driver to use. See terra::gdal(drivers=TRUE).

pypath, quiet

deprecated. maintained for backwards compatibility only (not used).

readpoly

logical indicating whether the polygons object should be returned (this was previously using gdal_polygonize on disk and required reading the file)

Value

if readpoly = TRUE (default), a SpatVector object; otherwise, NULL.


PredictiveEcology/map documentation built on June 15, 2025, 6:15 a.m.