Skip to main content

General Function Reference

Functions that belong to no one package. They describe the runtime, not a raster, a grid or a geometry.

Import path

databricks.labs.gbx.drivers.functions (Python). In SQL the name is gbx_drivers. See Surfaces & Levels for how GeoBrix picks the implementation.

Listing GDAL drivers​

gbx_drivers lists the GDAL drivers that the current environment can run, one row per driver. It answers which formats this runtime reads and writes, which are raster or vector, and whether GeoBrix allows them. The rows come from GDAL as it runs now, so they change if you add or remove packages. The as-provided list shows the drivers that the env wheel ships.

drivers​

SQLPython
SurfaceCallReturns
SQL (session)gbx_drivers([kind])rows
Pythondrivers.functions.drivers(kind=None)DataFrame

Rows: driver STRING, description STRING, raster BOOLEAN, vector BOOLEAN, read BOOLEAN, write BOOLEAN, extensions ARRAY<STRING>, allowed BOOLEAN, tile_bytes BOOLEAN, available BOOLEAN, requires STRING, shipped BOOLEAN, tested BOOLEAN, tested_with STRING, guidance STRING, docs ARRAY<STRING>, help_url STRING.

ParameterSQL typeDefaultDescription
kindSTRINGNULL'raster' or 'vector' keeps only those drivers; NULL lists every driver.
Streaming UDTF
Implementation

Powered by GDAL's driver registry, through the env wheel's Python bindings. Without them, the function raises an error that names the env wheel to install.

Call it as a table function. Pass 'raster' or 'vector' to keep one kind, or leave the argument out for every driver.

ColumnMeaning
driverGDAL's short name for the driver, such as GTiff or ESRI Shapefile.
descriptionGDAL's long name for the driver.
raster, vectorWhether the driver handles rasters, vectors, or both (GeoPackage).
read, writeWhether the driver can open a dataset, and whether it can create or copy one.
extensionsThe file extensions GDAL associates with the driver.
allowedWhether GeoBrix lets the driver open data. GeoBrix turns off some drivers by default, so they do not appear. See the opt-in drivers.
tile_bytesWhether a raster of this driver can be held as the bytes of a tile.
availableWhether the driver works as shipped. It is false for a driver that needs a service, a program or a plugin this runtime lacks.
requiresWhat the driver needs that the runtime does not supply, or NULL. A format that reads sidecar files names them here.
shippedWhether the driver is in the env wheel's own build. A false value means a package in this environment added it.
testedWhether GeoBrix's extended driver tests cover the driver in this release. It describes the release, not the environment.
tested_withThe GeoBrix readers, writers and functions the tests used, or NULL for a driver that is not tested.
guidanceA short note on what GeoBrix offers for the format: the built-in reader or writer to use, and what it covers. Every driver has one.
docsThe absolute URLs of the docs pages that explain the guidance. The array is empty when the note has no page.
help_urlThe driver's page on gdal.org, or NULL.

A driver can be available and still list requires. A shapefile works as shipped, but its .shx and .dbf files must sit beside the .shp file.

Since v0.6.0
-- One row per vector driver of this runtime, filtered to the ones that can write.
SELECT driver, description, extensions
FROM gbx_drivers('vector')
WHERE write AND allowed AND available
ORDER BY driver;
Example output
+--------------+----------------------------+------------------------+
|driver |description |extensions |
+--------------+----------------------------+------------------------+
|BAG |Bathymetry Attributed Grid |[bag] |
|CSV |Comma Separated Value (.csv)|[csv, tsv, psv] |
|DGN |Microstation DGN |[dgn] |
|DXF |AutoCAD DXF |[dxf] |
|ESRI Shapefile|ESRI Shapefile |[shp, dbf, shz, shp.zip]|
+--------------+----------------------------+------------------------+
only showing top 5 rows of 38