The following simplified graphic illustrates the case (very schematically, I must add): One property can fall within several adjacent zoning polygons, which effectively defines the cardinality (or the type of the relationships between features in both datasets) as One to Many (Properties to Zones). properties) and another one representing zones (i.e. Imagine you had a polygon feature class representing cadastral boundaries (i.e.
Recently, a couple of my clients asked me how to solve the following problem. Ogr2ogr -progress -overwrite -skipfailures -f "PostgreSQL" PG:"host=localhost user= dbname= password=" ".From time to time, even the experienced GIS users (my 17 years in GIS allow me to call myself one) come across hidden tools and workflows that have existed in ArcGIS for Desktop for ages, but have never been used. Use the following command, replacing the text between square braces with values appropriate to your configuration (square braces should not be included in your command): The contents of the file geodatabase will appear in the Layers pane, and each layer can be exported to any other format with write support in GDAL, including the shapefile format.įor large geodatabases whose contents exceed the limits of the shapefile specification, we recommend using GDAL's ogr2ogr command line interface to copy the contents of a file geodatabase directly to a PostGIS database.
The geodatabase may appear as a folder and may not be selectable using the Add Vector Layer tool in QGIS.
QGIS users can read file geodatabases by dragging the geodatabases, ending in the extension.
Therefore, users needing to regularly edit file geodatabases should install and use the FileGDB driver, while users needing only to convert file geodatabase contents to other formats should use the OpenFileGDB driver.
However, internal testing at Geospatial UCLA has indicated that for read-only file geodatabase operations, FileGDB driver can be many orders of magnitude slower than the OpenFileGDB driver. FileGDB depends upon Esri's File Geodatabase SDK, but it provides both read and write access to file geodatabases.
The driver's specifications indicate that this driver is capable of efficiently reading the contents of databases with large numbers of fields, without depending in any way upon proprietary software.Īn additional option for interacting with file geodatabases using GDAL is the FileGDB driver. GDAL users who work with file geodatabases should know that GDAL now includes a very robust open source, read-only driver for the file geodatabase format: OpenFileGDB.
Users of ArcGIS regularly use file geodatabases when attribute tables exceed the storage capacity of a shapefile attribute table (an individual DBF file is limited to ~2GB in size). The file geodatabase format has emerged as a very common format for storing and exchanging spatial data, particularly considering that it allows for the storage of multiple data layers, and that it allows for the storage of data layers that exceed the limits of other specifications. Despite the widely held misconception that file geodatabases (.gdb) can only be read and edited using tools within Esri's ArcGIS platform, recent versions of GDAL (and, therefore, GDAL-utilizing applications like QGIS) are capable of efficiently reading and extracting information from file geodatabases.