GDB, ESRI File Geodatabase

The well-known American GIS company ESRI utilizes several different "geodatabase" formats for data, in three main types:  

 

 

 

 

File geodatabases are recommended by ESRI over personal databases and, in the new format, are becoming one of the most frequent formats used to publish spatial data for use by ESRI applications.  Old format file geodatabases are rarely encountered.  ESRI provides an SDK, a software library, to connect to new format ESRI file geodatabases for read/write access.   Manifold uses the ESRI SDK to connect to ESRI file geodatabases.   

 

Manifold Includes New Format ESRI File Geodatabase Capability

 

All required ESRI DLLs for new format file geodatabases are included within Manifold installation packages, including portable installations, and are installed automatically when Manifold is installed.  Launching Manifold always includes ESRI file geodatabase capability.   There is no need to install anything extra to allow Manifold connections to ESRI file geodatabases.

 

The Manifold GDB Dataport is Read / Write

 

Many, but not all, applications which utilize ESRI's SDK to connect to file geodatabases are read/write.  Some 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.  

 

The Manifold GDB dataport:

 

 

Limitations of the ESRI SDK:

 

 

 

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

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.   

 

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

Importing a File Geodatabase

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.  

 

dlg_import_fgdb.png

 

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.

 

dlg_import_fgdb_filtered.png

 

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.

 

eg_import_fgdb01_01.png

 

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 first create a new data source using a Bing satellite image server as shown in the Example: An Imageserver Tutorial topic.   We then create a map and drag and drop the Bing layer into the map, and then we drag and drop a drawing into the map.

 

eg_import_fgdb01_02.png

 

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.

 

dlg_link_fgdb.png

 

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.

 

eg_link_fgdb01_01.png

 

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.  

 

eg_link_fgdb01_02.png

 

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 them.    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.

 

eg_link_fgdb01_03.pngeg_link_fgdb01_04.png

 

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 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.

 

eg_link_fgdb01_05.pngeg_link_fgdb01_06.png

 

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.

 

eg_link_fgdb01_07.png

 

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

 

eg_link_fgdb01_08.png

 

We can right-click onto the new TaxParcel Drawing and choose Properties to open the properties pane to see that the new drawing consists of just two short items of 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.   

 

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.

 

eg_link_fgdb01_09.png

 

We can double-click open the new TaxParcel Drawing and then use Style to apply formatting to areas.

 

eg_link_fgdb01_09a.png

 

If we open up the Properties dialog for TaxParcel Drawing we can see that styling the drawing added two style properties, each with information in JSON format that describes the style.    The new TaxParcel 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.

 

eg_link_fgdb01_10.png

 

We have saved our project as NapervilleGas_gdb.map 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 NapervilleGas_gdb.map in one Manifold session.

 

eg_link_fgdb01_11.png

 

  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.

 

eg_link_fgdb01_12.png

 

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).

 

eg_link_fgdb01_13.png

 

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

 

eg_link_fgdb01_14.png

 

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

 

eg_link_fgdb01_15.png

 

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

 

ico_nb_arrow_blue.pngCopying 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

 

Notes

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.

 

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 anywhere near as bulletproof as the Radian technology used in Manifold.  ESRI code can and does crash, so connections to GDB fall outside of Manifold's reputation for never crashing.  

 

Videos

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

 

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.