Skip to main content

fgdb_to_gpkg

fgdb_to_gpkg is a Python package that converts all feature classes within an Esri File GeoDatabase to layers within a OGC GeoPackage. This package is designed to be used from the command line or imported as a module.

This package does not have a dependency on ArcPy, which means that you can safely extract feature classes locked inside an Esri File GeoDataBase without needing to worry about any ArcGIS licensing.

Prerequisites

This package requires GDAL and its development libraries to be installed on your system before installing fgdb_to_gpkg or its dependencies. For more details please refer to the official documentation.

To confirm GDAL is installed, run:

gdalinfo --version
# GDAL 3.8.4, released 2024/02/08

Installation

Installing from PyPI

# Recommended: Install globally using pipx
pipx install fgdb-to-gpkg

# Or install to a manually-created virtual environment
python -m venv env
./env/bin/pip install fgdb-to-gpkg

# Or install to the global Python environment
pip install fgdb-to-gpkg

Installing the development version of this package

  1. Clone the repository: git clone https://github.com/philiporlando/fgdb_to_gdb.git
  2. Navigate to the repository directory: cd fgdb_to_gdb
  3. Install the package and its dependencies with uv:
    uv sync --group dev
    
  4. Optionally, install the package to be run globally with pipx: pipx install --editable .

Usage

Command Line Usage

To use from the command line, simply call the fgdb-to-gpkg command with the path to the input File GeoDatabase and the path to the output GeoPackage:

fgdb-to-gpkg <input_fgdb_path> <output_gpkg_path>

See the help menu for more details:

fgdb-to-gpkg --help

Module Usage

You can also import fgdb_to_gpkg as a module in Python and use it to convert any Esri File GeoDatabase feature classes to GeoPackage layers programmatically.

Here's an example of how to use fgdb_to_gpkg as a module:

from fgdb_to_gpkg import fgdb_to_gpkg

input_fgdb_path = "/path/to/my_fgdb.gdb"
output_gpkg_path = "/path/to/my_gpkg.gpkg"

fgdb_to_gpkg(input_fgdb_path, output_gpkg_path)

See the help menu for more details:

help(fgdb_to_gpkg)

Testing

Unit tests can be performed by the developers of this package using the following command:

uv run pytest

Test coverage can be assessed using the following command:

uv run pytest --cov=fgdb_to_gpkg --cov-report term-missing

Handling the Fiona GDAL compilation error

The unit tests within this package depend on gdal=^3.6.0, but the current version of fiona ships with gdal=3.5.3. The fiona package must be installed using the --no-binary flag to test this package. If this is not configured properly, then you will see the following error:

uv run tests
# fiona.errors.DriverError: OpenFileGDB driver requires at least GDAL 3.6.0 for mode 'w', Fiona was compiled against: 3.5.3

If you encounter errors related to GDAL or Fiona compatibility, ensure you have the correct versions installed and that your environment is synced using uv. If you still encounter issues, try reinstalling Fiona with:

uv pip install --force-reinstall fiona --no-binary fiona

Publishing

This package is automatically published to PyPI when a new release is crafted. For a successful publication, maintainers should:

  1. Increment the version number in the pyproject.toml file.
  2. Adhere to the vX.X.X naming convention for the release name and tag.

Metadata

Release files for fgdb-to-gpkg 0.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fgdb-to-gpkg 0.4.7
File Size Uploaded Provenance Actions
fgdb_to_gpkg-0.4.7.tar.gz 77.6 kB Without provenance Details for fgdb_to_gpkg-0.4.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fgdb-to-gpkg 0.4.7
File Interpreter ABI Platform Actions
fgdb_to_gpkg-0.4.7-py3-none-any.whl Python 3 none any Details for fgdb_to_gpkg-0.4.7-py3-none-any.whl

Total release size: 94.7 kB

Release files / fgdb_to_gpkg-0.4.7.tar.gz

Download URL fgdb_to_gpkg-0.4.7.tar.gz
Size 77.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bf18e87640707f44f6f272bdfd48462f07b0114a24c167aece4d7fc118e46d43
BLAKE2b-256 checksum
How to use checksums
cc6e5c5fe79357528a5678df66191f2eb33fc4677f322b311888e8edea027c98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / fgdb_to_gpkg-0.4.7-py3-none-any.whl

Download URL fgdb_to_gpkg-0.4.7-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b42cad942b88e2cb08b945848c0dddfdb9bf48d6269f6a3d74e5c2032911091
BLAKE2b-256 checksum
How to use checksums
5ad437299558bcc38a3d85ed13ca0be69baabb29f0b214808c13e956d8482c90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for fgdb-to-gpkg 0.4.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page