Skip to contents

dbSpatial Package

Functions and methods for dbSpatial objects

as_dbSpatial()
Convert an sf or terra object to a dbSpatial object
dbSpatial()
Create a dbSpatial object with geometry data type
show(<dbSpatial>)
show method for dbSpatial
st_as_sf(<dbSpatial>)
Convert dbSpatial objects to sf objects
vect(<dbSpatial>)
Create SpatVector objects

Spatial Joins

Functions and methods that perform a spatial join between dbSpatial objects.

st_join(<dbSpatial>)
Spatial join for dbSpatial objects

Spatial Summary

Functions and methods that summarize geometry data in a dbSpatial object.

st_bbox(<dbSpatial>)
Compute bounding box for dbSpatial object
st_xmax()
Get maximum x coordinate
st_ymax()
Get maximum y coordinate

Spatial Properties

Functions and methods that return a single vector about a geometry in a dbSpatial object.

st_geometrytype()
Get geometry types (DuckDB-native)

Geometry construction

Functions and methods for constructing or modifying geometry in a dbSpatial object.

st_translate()
Translate x, y coordinates by delta x, delta y for point geometries
st_as_geojson()
Convert to GeoJSON
st_as_text
Convert to WKT

DuckDB Spatial Extension

Functions and methods specific for DuckDB spatial extension.

loadSpatial()
Install and/or load DuckDB spatial extension

dbData

dbData methods

head(<dbSpatial>)
head method for dbSpatial
tail(<dbSpatial>)
tail method for dbSpatial

Geometry Operations

Functions that modify or transform geometries.

st_buffer
Compute buffer around geometry
st_centroid
Compute centroid of geometry
st_simplify
Simplify geometry

Measurements

Functions that compute metric measurements of geometries.

st_area
Get area of geometries
st_length
Get length of geometries
st_perimeter
Get perimeter of geometries

Accessors

Functions that extract coordinates or properties.

`$`(<dbSpatial>)
Column extraction for dbSpatial
st_npoints()
Get number of points
st_x()
Get X coordinate
st_y()
Get Y coordinate

Configuration

Global package options.

dbSpatial_options dbSpatial-options
dbSpatial Package Global Options