Skip to main content

The aim of this tool is to convert an ESRI file Geodatabase to a PostGIS database maintaining data, domains, subtypes and relationships. The tool will copy over the feature classes as postgis layers and the tables as standard tables. The domains and subtypes will be converted to PostgreSQL lookup tables. The tool will then create all necessary indexes and constraints to maintain the required relates between the layers, tables and lookup tables. To recreate the same experience of the domains and subtypes in QGIS using the output data, please install the plugin Data Manager. Now you can have domain experience in QGIS that is stored in the database and not in the QGIS project.

Installation

This package should be installed on windows systems into ArcGIS Pro conda python environment. (because of Arcpy)

Install required packages::
  • pip install numpy>=1.12.0

  • pip install psycopg2>=2.6.2

  • pip install ruamel.yaml>=0.15.35

  • pip install awesome-slugify==1.6.5

Install fgdb2postgis::
  • pip install fgdb2postgis

Usage

Create a yaml file mapping the file geodatabase’s feature datasets, feature classes and tables to postgresql’s schemas. It is required that the yaml file have the same name with the file geodatabase with the extension .yaml If the yaml file does not exist it will be created automatically, splitting the file geodatabase feature datasets to postgresql schemas Since we have the yaml file with the entire schema of the file geodatabase we can modified it and run the tool again.

Example:

filegdb: sample.gdb
   yaml: sample.gdb.yml

Yaml file example:

Schemas:
  - Administrative
  - Epidemiology
  - Radioactivity
  - Seismic
FeatureDatasets:
  Epidemiology:
    - Epidemiology
  Radioactivity:
    - Radioactivity
  Seismic:
    - Seismic
FeatureClasses:
  Administrative:
    - sectors
    - governorates
    - sub_sectors
Tables:
  Epidemiology:
    - EpidemiologyTS
    - EpidemiologyTST
  Radioactivity:
    - RadiationTS
    - RadiationTST
  Seismic:
    - EarthquakeTS
    - SeismicTST
Schemas:

The schemas to be created in the target postgis database.

FeatureDatasets:

Mapping of the geodatabase’s feature datasets to the schemas of the target postgis database

FeatureClasses:

Mapping of the geodatabase’s feature classes that do not belong to any feature dataset to the schemas of the target postgis database

Tables:

Mapping of the geodatabase’s tables to the schemas of target postgis database

Command line options:

fgdb2postgis -h
fgdb2postgis -f filegdb
            -p postgis
            --host=host
            --port=port
            --user=user
            --password=password
            --a_srs=a_srs
            --t_srs=t_srs
Last Update:
  • Migrate to Python 3.6.9 (ArcGIS Pro 2.5.1)

  • 12 May 2020

License

MIT License

Copyright (c) 2020 George Ioannou <gmioannou@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for fgdb2postgis 0.3.6

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

Source distribution (sdist)

Source distribution for fgdb2postgis 0.3.6
File Size Uploaded
fgdb2postgis-0.3.6.tar.gz 12.0 kB Details

Release files / fgdb2postgis-0.3.6.tar.gz

Download URL fgdb2postgis-0.3.6.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a308d5b3312707740dc1af99668d353496b5526804a46d2d6cf322967ffe1ee2
BLAKE2b-256 checksum
How to use checksums
fe57ba7f352b4d1e03baea380e51840608ba7a735209024d36241e831d821dd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.3.6 This release

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

2 release files

0.2.4

1 release file

0.2.3

2 release files

0.2.2

2 release files

0.2.1

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.2

1 release file

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