Skip to contents

Compute a buffer around this geometry.

Usage

sx_buffer(
  x,
  dist,
  output = NULL,
  view_name = NULL,
  verbosity = NULL,
  use_s2 = NULL,
  ...
)

Arguments

x

Input object (sf, sedonadb_dataframe, or character view name).

dist

A single numeric value representing the buffer distance. Note: SedonaDB currently does not support column-based distances for buffering.

output

Character or NULL. Output type: sedonadb_dataframe (default), sf, tibble, geoarrow, or raw. If NULL, uses getOption("sx.output_type", "sedonadb_dataframe").

Output types:

  • sedonadb_dataframe: Lazy data frame (no collection).

  • sf: Materialized sf object.

  • tibble: Tibble without geometry.

  • geoarrow: Tibble with geoarrow_vctr geometry (Arrow-native).

  • raw: Tibble with geometry as raw WKB bytes (for database import).

view_name

Character (optional). Name to register the result as a persistent view in the active backend. If NULL (default), returns the result directly without creating a view.

Not all backends support named views. Check backend-specific documentation for availability.

verbosity

Character or NULL. Controls message output for this function call.

  • "quiet": Suppress all informational messages.

  • "info": Show standard progress and status messages.

  • "debug": Show additional diagnostic messages for troubleshooting.

If NULL (the default), uses the global sx.verbosity option. See sx_options() for persistent configuration.

use_s2

Logical or NULL. Controls spherical geometry (S2) for this operation.

  • TRUE: Use S2 spherical geometry (accurate for geographic coordinates).

  • FALSE: Use planar geometry (faster, appropriate for projected CRS).

  • NULL (default): Uses the global sx_use_s2() setting.

...

Ignored. Used to catch and warn about unsupported sf arguments.

Value

Result (type depends on output)