duckspatial0.9.0 package

R Interface to 'DuckDB' Database with Spatial Extension

convert_to_sf_wkb

Converts from data frame to sf using WKB conversion

convert_to_sf

Converts from data frame to sf

dbConnCheck

Check if a supported DuckDB connection

ddbs_area

Calculates the area of geometries

ddbs_as_hexwkb

Convert geometries to hexadecimal Well-Known Binary (HEXWKB) format

ddbs_as_text

Convert geometries to Well-Known Text (WKT) format

ddbs_as_wkb

Convert geometries to Well-Known Binary (WKB) format

ddbs_bbox

Returns the minimal bounding box enclosing the input geometry

ddbs_boundary

Returns the boundary of geometries

ddbs_buffer

Creates a buffer around geometries

ddbs_centroid

Calculates the centroid of geometries

ddbs_combine

Combine geometries into a single MULTI-geometry

ddbs_concave_hull

Returns the concave hull enclosing the geometry

ddbs_contains_properly

Spatial contains properly predicate

ddbs_contains

Spatial contains predicate

ddbs_convex_hull

Returns the convex hull enclosing the geometry

ddbs_covered_by

Spatial covered by predicate

ddbs_covers

Spatial covers predicate

ddbs_create_conn

Create a DuckDB connection with spatial extension

ddbs_create_schema

Check and create schema

ddbs_crosses

Spatial crosses predicate

ddbs_crs

Check CRS of a table

ddbs_difference

Calculates the difference of two geometries

ddbs_disjoint

Spatial disjoint predicate

ddbs_distance

Returns the distance between two geometries

ddbs_drivers

Get list of GDAL drivers and file formats

ddbs_envelope

Returns the envelope (bounding box) of geometries

ddbs_equals

Spatial equals predicate

ddbs_exterior_ring

Extracts the exterior ring of polygon geometries

ddbs_filter

Performs spatial filter of two geometries

ddbs_flip

Flip geometries horizontally or vertically

ddbs_generate_points

Generate random points within geometries

ddbs_glimpse

Check first rows of the data

ddbs_install

Checks and installs the Spatial extension

ddbs_interpolate_aw

Areal-Weighted Interpolation using DuckDB

ddbs_intersection

Calculates the intersection of two geometries

ddbs_intersects_extent

Spatial intersects extent predicate

ddbs_intersects

Spatial intersects predicate

ddbs_is_simple

Check if geometries are simple

ddbs_is_valid

Check if geometries are valid

ddbs_is_within_distance

Within Distance predicate

ddbs_join

Performs spatial joins of two geometries

ddbs_length

Calculates the length of geometries

ddbs_list_tables

Check tables and schemas inside a database

ddbs_load

Loads the Spatial extension

ddbs_make_polygon

Creates polygons from linestring geometries

ddbs_make_valid

Make invalid geometries valid

ddbs_overlaps

Spatial overlaps predicate

ddbs_predicate

Spatial predicate operations

ddbs_quadkey

Convert geometries to QuadKey tiles

ddbs_read_vector

Load spatial vector data from DuckDB into R

ddbs_register_vector

Register an SF Object as an Arrow Table in DuckDB

ddbs_rotate_3d

Rotate 3D geometries around an axis

ddbs_rotate

Rotate geometries around centroid

ddbs_scale

Scale geometries by X and Y factors

ddbs_shear

Shear geometries

ddbs_shift

Shift geometries by X and Y offsets

ddbs_simplify

Simplify geometries

ddbs_stop_conn

Close a duckdb connection

ddbs_touches

Spatial touches predicate

ddbs_transform

Transform coordinate reference system of geometries

ddbs_union

Union of geometries

ddbs_within_properly

Spatial within properly predicate

ddbs_within

Spatial within predicate

ddbs_write_vector

Write an SF Object to a DuckDB Database

feedback_query

Feedback for query success

get_geom_name

Get column names in a DuckDB database

get_query_name

Get names for the query

get_st_predicate

Gets predicate name

overwrite_table

Feedback for overwrite argument

Fast & memory-efficient functions to analyze and manipulate large spatial data data sets. It leverages the fast analytical capabilities of 'DuckDB' and its spatial extension (see <https://duckdb.org/docs/stable/core_extensions/spatial/overview>) while maintaining compatibility with R’s spatial data ecosystem to work with spatial vector data.

  • Maintainer: Adrián Cidre González
  • License: GPL (>= 3)
  • Last published: 2026-01-10