GDB, ESRI File Geodatabase

Esri utilizes several different "geodatabase" formats for data, in four main types:  






File Geodatabases

Esri's file geodatabase format is the new ArcGIS "geodatabase" format that has replaced personal geodatabases and, in the new format, has replaced the now-obsolete "old" format file geodatabase used with ArcGIS 9.  Data in a file geodatabase is stored and managed in a huge collection of files, all located within a single folder, with one of those files being named gdb (no extensions, just "gdb").   File geodatabases often called FGDB for short.


File geodatabases are recommended by Esri, and have become one of the most frequent formats used to publish spatial data for use by Esri applications.  Esri provides an SDK/API, a software library with an application programming interface, to connect to  Esri file geodatabases for read/write access.   Manifold uses the Esri API to connect to Esri file geodatabases, to connect to vector (drawings) data and tables.    


Esri's API does not allow access to rasters in file geodatabases.   However, if we would like read-only access to rasters in file geodatabases we can use Manifold's ability to connect to file geodatabases through GDAL, an optional open source package that can be installed and used together with Manifold.  Recent versions of GDAL include an experimental module that can connect to rasters in file geodatabases.


Manifold products like Release 9, Viewer, and SQL for ArcGIS Pro use Esri's own API to connect to file geodatabases, with the API built into the Manifold product.  All required Esri DLLs for new format file geodatabases are included within Manifold installation packages, including portable installations, and are installed automatically when the Manifold product is installed.  Launching the Manifold product thus always includes Esri file geodatabase capability, using Esri's own code.   There is no need to install anything extra to allow Manifold connections to Esri file geodatabases.


The Manifold GDB Dataport is Read / Write


Some applications from other vendors that connect to file geodatabases are read only.  The Manifold GDB dataport is fully read/write and allows Manifold to edit Esri file geodatabases in place.  Manifold  includes numerous technical features to facilitate read/write use of Esri file geodatabases without problems.  


Geodatabases often contains some fields that are read only.   Fields in a table window that cannot be edited will be shown with a gray background color.  Examples are special fields like the OBJECTID field for the primary key, or calculated length or area fields that may appear in attribute tables.  Fields with a gray background color are read-only fields and are typically calculated or otherwise automatically generated fields.



The Manifold GDB dataport:



Limitations of the Esri API:




SELECT [area], [code], [name], [geom]

INTO [gdb]::[states] (

  PROPERTY 'FieldGeomType.geom' 'area' -- the default would be 'point'

) FROM [states];


Note that to create a layer in the GDB that other packages can read, besides adding the FieldGeomType.geom property to specify the shape type, we would also have to add the FieldCoordSystem.geom property to specify the coordinate system to be used, for example, 'EPSG:4326'.  In the property names we would substitute the desired geometry field name for geom if some other name is used, for example, FieldGeomType.SHAPE if the name of the geometry field is SHAPE.  Example:



SELECT [area], [code], [name], [geom]

INTO [gdb]::[states] (

  PROPERTY 'FieldGeomType.SHAPE' 'area',

  PROPERTY 'FieldCoordSystem.SHAPE' 'EPSG:4326'

) FROM [states];


For an example of connecting to an Esri GDB, please see the Example: Connect to an ESRI GDB File Geodatabase topic.

Importing a File Geodatabase

In this topic, we illustrate import of a file geodatabase containing information on a gas utility company in Naperville, Illinois.  


Important: When importing a file geodatabase file the tables and queries that appear in the Manifold project are Manifold components with no further connection to the file geodatabase file from which they were imported.  



There are so many files within a GDB folder that it makes sense to first set the file type filter to GDB Files, so only the gdb file we want appears.  We can then double-click it more easily.



To import from file geodatabase format:


  1. Choose File-Import from the main menu.

  2. In the Import dialog browse to the GDB folder containing the gdb file.

  3. Double-click the gdb file desired.

  4. Everything found in that gdb file geodatabase will be imported into the project.



This particular .gdb database contains numerous drawings and tables, organized within folders, related to a gas utility company in Naperville, Illinois.   We can double-click a drawing or a table to open it.


For a more interesting display, we create a new map using the TaxParcel.Shape drawing and Bing streets as a base layer.



The drawing we added shows tax parcels in Naperville.   We have used the Style pane to color them using different colors.

Linking a File Geodatabase

Important: When linking a file geodatabase file the tables and queries that appear in that data source in the Manifold project stay resident in the file geodatabase .gdb file.   They are .gdb components even though they may appear in many respects, for the convenience of the user, to be Manifold components.   Personal geodatabase files linked into a Manifold project are fully read/write.



The Save cache  button allows setting cache options.   Most often when linking to a format like file geodatabase, we will ensure the Save cached box is not checked.  Working with a linked file geodatabase will be faster if we check the box, but if we are going to cache data within the project we may as well simply import the file geodatabase and use full Manifold speed.   We uncheck the box and then we press Link.


To link a file geodatabase file:


  1. Choose File-Link from the main menu.

  2. In the Link dialog browse to the folder containing the gdb file.

  3. Click the gdb file desired.

  4. Check or uncheck the Save cache box as desired.

  5. Press Link.  A linked data source will appear in the project.

  6. Press the + icon next to the data source to expand the data source to see the tables and queries it contains.



That creates a data source called NapervilleGas.gdb that contains all of the drawings and tables in the file geodatabase.   We can click on the + icon by the data source cylinder to expand the data source hierarchy.  



We can display a drawing in a map above a Bing satellite image server layer, as we did earlier in this topic.   In the illustration above we show tax parcels in Naperville, using the Style pane to color the TaxParcel.Shape drawing.    


 We can style drawings within a GDB but only for the duration of the Manifold session.  If we close the project and then re-open it, the style we have applied to drawings within the GDB will be lost.

Saving Style with Linked GDB

Esri GDB as a format cannot save Manifold style information, so if we would like to save style applied to drawings in a GDB in a persistent way, we can create a drawing in the Manifold project that links back to the data source, but which can be styled because it is resident in the project.  This is similar to the technique used in the Example: Style Applied to an Image Server Image topic.



We link the NapervilleGas GDB into our project to create a NapervilleGas.gdb data source  (illustration at left above).   We expand the resulting data source, click on the TaxParcel.Shape drawing to highlight it, and we press the Copy button on the toolbar (illustration at right above).  


We could also simply press Ctrl-C for Copy.



Next, we Right-click into the Manifold .map part of the project pane, that is, outside of the NapervilleGas.gdb data source, and we choose Paste from the context menu.   


We could also just click into the .map part of the project to move the focus there and then press Ctrl-V for Paste.



That creates a new drawing in the project called TaxParcel.Shape.   Like all drawings, the new TaxParcel.Shape drawing does not actually contain any data.  Drawings are simply a component that says what geometry field in what table to visualize.     



We can right-click onto the new TaxParcel.Shape drawing and choose Properties to open the properties pane to see that the new drawing consists of just a few items of necessary information: the drawing uses the geometry field called Shape from within the table called [NapervilleGas.gdb]::[TaxParcel], that is, the TaxParcel table that is inside the NapervilleGas.gdb data source.    The properties also include Style properties for the area symbology and the fill color (ColorBack).


Drawings are just a link, a shortcut to where the data resides, in this case a table within an external data source, along with some other properties, if desired, like style.



We can double-click open the new TaxParcel.Shape drawing to see it uses the same Style as the drawing within the NapervilleGas.gdb data source.   That's no surprise since it was copied from that same drawing.  Copying a drawing copies all of its properties, including Style properties.


We can right-click onto the TaxParcel.Shape drawing within the NapervilleGas.gdb data source and choose Properties. we can see that it uses exactly the same Style properties as the new TaxParcel.Shape drawing within the main part of the project.



The new TaxParcel.Shape drawing is in the Manifold .map portion of the project, so when we save the project the drawing and all the style properties it has will get saved, ready to be used the next time we open the project.  

Copy and Paste between Manifold Sessions

Suppose we would like to utilize the styled tax parcel drawing we have just created in a different Manifold project.   We can copy and paste components and data sources between different Manifold projects, so that is easy to do.



We have saved our project as in Manifold .map project format.   Perhaps this is just one of many Manifold projects we have saved on an archival server our workgroup or organization uses.   


In the illustration above, we have opened our in one Manifold session.



  We would now like to use the nicely-styled TaxParcel Drawing in a new project.   We launch a second session of Manifold, which opens with a new, blank project, seen above.



In the NapervilleGas_gdb project we Ctrl-click on the NapervilleGas.gdb data source and we Ctrl-click on the TaxParcel Drawing, to highlight both of them.  Next, we press the Copy button on the Project pane toolbar (or, we simply press Ctrl-C for Copy).



We switch to the new, blank project session of Manifold and we press the Paste button on the Project pane toolbar.  



The NapervilleGas.gdb data source and the TaxParcel Drawing appear in the project.  



When we double-click open the TaxParcel Drawing we see it is the same drawing, retaining the same style.


Copying and pasting data sources between Manifold sessions works when the PATH to the data source resource is the same from both sessions.


Exporting / Writing to GDB

GDB drawings cannot handle a mix of object types.  Therefore when exporting to GDB, Manifold will split a drawing that contains a mix of points, lines and areas into three different drawings within the GDB.    Likewise, when writing to a GDB that is linked, for example, when copying a drawing from a Manifold project and pasting into a linked GDB data source, Manifold automatically splits a drawing containing geoms of different object types into separate drawings for each type within the GDB



Text value truncation -  Exporting data to an Esri file geodatabase automatically truncates text values to 4096 characters, to protect against accidental insertions of very long text values that might impact geodatabase performance.   When text fields are truncated, the log window will report the names of fields containing truncated values as well as the total number of truncated values in the log.


Pass through of GDB to third party applications - When an Esri GDB file geodatabase is connected as a data source within a Manifold project, that data source then becomes available to any third party application which connects to the Manifold .map project by using the Manifold ODBC driver.   This provides the ability to read/write Esri file geodatabases even to those applications which on their own cannot connect to Esri file geodatabases.   See examples cited below.


Mixed Geometry Types -  Manifold allows a mix of geometry types, such as points, lines, and areas, within the same table, while GDB does not.  Copying and pasting a table that uses a mix of geometry types from a .map file into GDB will automatically sets the geometry type of the pasted data to whichever type is used by most records.  This is a way of ensuring that tables which use only one type (points, lines, areas) have the type that they use correctly specified in GDB.


Esri is not Manifold - When connecting to GDB we must be aware we are no longer using Manifold code but instead are using Esri code.  Esri products are high quality and there are many advantages to using Esri's own code to connect to intricate Esri formats such as GDB, since presumably Esri's code can handle all the many internal and undocumented quirks of the format. One major disadvantage is that Esri's code in general is not as bulletproof as the Radian technology used in Manifold, so connections to GDB fall outside of Manifold's reputation for never crashing.  


Rasters (Images) in File Geodatabases - To connect to Esri file geodatabases, Manifold's built-in connection to file geodatabases uses Esri code within Esri's API for connections to file geodatabases.   Esri's API does not allow access to rasters in file geodatabases, so Manifold's file geodatabase data source will not show any raster (image) contents of a file geodatabase.  If we would like read-only access to rasters in file geodatabases we can use Manifold's ability to connect to file geodatabases through GDAL, an optional open source package that can be installed and used together with Manifold.  Recent versions of GDAL include a module that can connect to rasters in file geodatabases.  The GDAL raster geodatabase module is not Manifold code and it is not Esri code.  It was written by third parties who have attempted to reverse engineer Esri's internal raster geodatabase format.  The module is not supported by either Manifold or Esri.



Manifold Viewer - View GDB Faster than ArcGIS Explorer - Esri's ArcGIS Explorer product is a free viewer that allows Esri people to view Esri GDB Geodatabases, along with other data.  Unfortunately, Esri has stopped producing Explorer and has replaced it with ArcGIS Earth, which cannot connect to and display Esri GDB Geodatabases.  The video compares Explorer to Viewer side-by-side so Esri users can see that if they need to continue viewing GDB Geodatabases for free they can reliably use Viewer for fast, high quality GDB viewing.


See Also

GDB, ESRI File Geodatabase, Old Format


GDBmobile, ESRI Mobile Geodatabases


MDB, ESRI Personal Geodatabase


ESRI SDE Geodatabase


Example: Convert an ESRI File Geodatabase into a .map Project - How to convert data in ESRI's current file geodatabase format into a  Manifold .map project in a single step.  We convert ESRI's example NapervilleGas GDB geodatabase, all 857 files, into a single, unified Manifold .map project.


Example: Convert an ESRI Personal Geodatabase into a .map Project - How to convert data in ESRI's legacy personal geodatabase format into a  Manifold .map project in a single step.


Example: Create an ODBC Data Source with Windows - How to create an ODBC data source (a DSN) using dialogs built into Windows 10.


Example: Connect to Manifold from Release 8  - Step by step procedure to connect from Manifold System Release 8 to a Manifold .map file using Manifold's ODBC driver.


Example: Connect to an ESRI GDB File Geodatabase - Connect Manifold to an ESRI GDB file geodatabase, display the contents, make a selection in the GDB and overlay in a map.


Example: Connect to an ESRI GDB usng GDAL/OGR  -  Instead of using Manifold's built-in ability to connect to modern ESRI GDB file geodatabases, use the Manifold GDAL/OGR dataport to take advantage of the GDAL library's ability to connect to deprecated GDB formats.


Example: Connect Through Manifold ODBC to a Third Party  - With Release 8, use an ODBC connection to a Manifold .map to connect through the .map project to a third party, external data source, an ESRI GDB file geodatabase.  We use Manifold facilities as an intermediary to give Release 8 capabilities it does not have on its own, to link into data stored within an ESRI file geodatabase.


Example: Connect LibreOffice Through Manifold to an ESRI GDB - A companion example topic to the Example: Connect Through Manifold ODBC to a Third Party  topic.  Shows how to connect LibreOffice Base, the database part of LIbreOffice, through Manifold to link an ESRI GDB file geodatabase table into LibreOffice.