Skip to main content

Readers & Writers

GeoBrix provides Spark DataSource V2 readers and writers for geospatial file formats, across both execution tiers — lightweight (pyrx, pure-Python, no JAR) and heavyweight (rasterx, GDAL/OGR-backed). Both tiers scale by partitioning work across the cluster rather than reading or writing sequentially on a single node.

Each lightweight *_gbx format pairs with a heavyweight counterpart (*_ogr / gdal / gtiff_gdal), and the two tiers are held to row-count / byte parity as a hard gate in benchmarking.

Readers

Load geospatial files into a distributed DataFrame. See the Readers Overview for the full list, tier differences, output schemas, and options.

FormatLightweightHeavyweight
Raster (generic)raster_gbxgdal
GeoTIFFgtiff_gbxgtiff_gdal
NetCDFnetcdf_gbxnetcdf_gdal
PMTilespmtiles_gbx— (light-only)
Vector (generic)vector_gbxogr
Shapefileshapefile_gbxshapefile_ogr
GeoJSONgeojson_gbxgeojson_ogr
GeoPackagegpkg_gbxgpkg_ogr
File Geodatabasefile_gdb_gbxfile_gdb_ogr

Writers

Write DataFrames back out to geospatial files. See the Writers Overview for the column contract, single-file vs sharded trade-offs, and per-format details.

FormatLightweightHeavyweight
Raster (generic)raster_gbxgdal
GeoTIFFgtiff_gbxgtiff_gdal
PMTilespmtiles_gbxpmtiles
NetCDFnetcdf_gbx— (light-only)
Vector (generic)vector_gbx
Shapefileshapefile_gbx
GeoJSONgeojson_gbx
GeoJSONLgeojsonl_gbxgeojsonl_ogr
GeoPackagegpkg_gbx
File Geodatabasefile_gdb_gbx— (hybrid; needs native GDAL)

Registering the lightweight tier

Heavyweight readers and writers are auto-discovered from the JAR. The lightweight Python DataSources are not auto-registered — call register(spark) once per session before using any *_gbx format:

from databricks.labs.gbx.ds.register import register
register(spark)

Next Steps

  • Readers Overview — every reader, tier differences, output schemas, options.
  • Writers Overview — the column contract, single-file vs sharded writers, per-format details.
  • Benchmarking — tier-vs-tier timing and parity methodology.