File Geodatabase (FGDB) Format
Description
ESRI File Geodatabase (.gdb) is a directory-based geospatial container for feature classes and tables. IterableData streams a selected layer through Fiona’s OpenFileGDB driver as GeoJSON-like Features. It is read-only and marked experimental. Aliases: gdb.
File Extensions
.gdb— File Geodatabase directory (path to the.gdbfolder)- Registry id:
fgdb
Implementation Details
Reading
- Requires a directory path (filename); streams/codecs are not supported
- Lists layers with
fiona.listlayers - Selects layer via
layerortableiniterableargs - If exactly one layer exists, it is used automatically; multiple layers require an explicit selection
- Yields
{"type": "Feature", "id", "properties", "geometry"} - Streaming: features are not preloaded into a list
Writing
Writing is not supported (WriteNotSupportedError).
Key Features
- Layer selection:
layer/table - Streaming features: Fiona collection iteration
list_tables(): discover layer names
Usage
from iterable import open_iterable
with open_iterable(
"data.gdb",
iterableargs={"format": "fgdb", "layer": "roads"},
) as source:
for feature in source:
print(feature["properties"], feature["geometry"])
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
layer | str | none | Conditional | Layer / feature class name |
table | str | none | Conditional | Alias for layer |
Required when the geodatabase contains more than one layer.
Installation
pip install 'iterabledata[geospatial]'
Requires Fiona with OpenFileGDB support (GDAL).
Limitations
- Read-only
- Directory path required (not a single flat file stream)
- Experimental maturity
- Requires Fiona/GDAL OpenFileGDB driver
- Multi-layer GDB without
layer/tableraisesValueError
Error Handling
- ImportError: missing
fiona— installiterabledata[geospatial] - WriteNotSupportedError: any write mode or
write()/write_bulk() - ReadError: stream/codec-only open without a path
- ValueError: no layers, or multiple layers without selection
- I/O / Fiona errors: missing path or unsupported driver
Related Formats
- GeoPackage — SQLite geospatial container
- FlatGeobuf — binary feature collections
- Shapefile — ESRI shapefile
- GeoParquet — Parquet with geometry