Example: Connect to an ESRI GDB usng GDAL/OGR

Manifold has the built-in ability to connect to, link, import and read/write to hundreds of different databases, file databases, file formats, web servers and similar data sources using Manifold's own internal code, with no need to install any additional software.  


In addition, Manifold includes a dataport that can launch the GDAL/OGR libraries to connect to any format those libraries support.   GDAL/OGR is an open source library for reading many different GIS formats.   Manifold does not install GDAL/OGR automatically, but it is easy to download and install if we want to use it.


Both the Manifold collection of data sources and the GDAL/OGR libraries collection of file formats are large collections so there is considerable overlap between the two.   In many cases there is a native Manifold dataport for a data source and there is also a module available in the GDAL/OGR collections for that format.   However, there are also data sources which Manifold supports that GDAL/OGR does not, and there are formats available within GDAL/OGR that Manifold does not include as a built-in to Manifold.


If we want to import data from a format that Manifold does not support but which is available within GDAL/OGR, we can use the Manifold GDAL dataport to connect through GDAL/OGR to the desired format.  While that will have limitations compared to using a native Manifold connection, using GDAL may be the only way to get data out of a format that is not otherwise supported by Manifold.


In this example we will use GDAL to get data from a file that uses an obsolete ESRI file geodatabase format.   Manifold reads/writes to modern ESRI GDB file geodatabase format but does not read the older, obsolete form.  GDAL includes an older, reversed engineered, non-ESRI module that usually can read the older format and get much, often all, of the information it contains.


 To use GDAL or OGR we must install GDAL in Windows, and then we can use it from Manifold.  If we do not install GDAL, we will not be able to use the capabilities described in this topic. See the the GDAL / OGR topic for installation instructions. The Manifold GDAL dataport allows working with GDAL versions set forth in the Third Party Release Levels topic, and automatically selects the latest version available with automatic adjustments for the call interface.

Use GDAL from Manifold to Import an "Old" GDB

We will import an "old format" GDB that is no longer supported by ESRI's SDK, but which is supported by the legacy GDB code in GDAL/OGR.


To fit into this documentation, illustrations show an artificially small Manifold desktop, with only a few panes, docked to the right side.   In real life we use a much larger Manifold desktop, and all panes would be turned on, with some panes docked to the left and others docked to the right.



We launch Manifold.   In the main menu choose File - Create - New Data Source.



Choose More... to launch the New Data Source dialog.



Choose a Name as desired and a Type of File: gdal.  Whether or not we check Open as read-only the resulting data source will be read-only.  We uncheck the Saved cached data between sessions box, to keep our project size smaller should we choose to save the project.   


Click the [...] browse button.



In the resulting Select File dialog we browse over the folder where our gdb file is located.    File geodatabases are usually stored in folders that contain many files so the gdb file may not be easy to find.  



We simply enter gdb into the dialog's File name box, as seen above, since we know from experience working with ESRI GDB that there is only one file with that name.  Press Open.



Back in the New Data Source dialog we verify everything is as we want and then we click Create Data Source.



Manifold swings into action and, like magic, a new data source appears in the project using the name we specified.  We can expand the new data source to see what it contains, in this case a drawing and its table.



Double-clicking the drawing opens it.   It looks like any other drawing, but it is being brought in from an "old format" ESRI file database using the GDAL/OGR library.



To make a local, fully writable copy of the drawing we can Ctrl-click the drawing and then Ctrl-click the  drawing's table to highlight both the drawing and the drawing's table and then click the Copy button in the Project pane's toolbar.   More keyboard-centric users often prefer to highlight and then do a Ctrl-C to Copy



Clicking anywhere in the project outside of the data source, we can do a Ctrl-V to Paste or press the Paste button in the Project pane's toolbar.



If we double-click the pasted drawing to open it we see it is, of course, identically the same drawing that was copied from the data source.   But this copy of that drawing is local to the project and is fully writable.


To delete the data source, we can click on the data source and then press the Delete key or click the Delete icon in the Project pane's toolbar.   We now have the drawing that was in the "old format" ESRI geodatabase imported as a local drawing into our Manifold project.  We can use the Style pane to format the drawing.  Now would be a good time to save the project.

Problems with GDAL imports

If nothing appears when importing using GDAL, launch the Log Window to see if there are any error messages.   For example, when importing an ESRI .e00 file fails, in the Log Window you might see an error message such as:


*** (import) This looks like a compressed E00 file and cannot be processed directly. You may need to uncompress it first using the E00compr library or the e00conv program.


Error messages in the Log Window might report other problems, such as the necessary GDAL .dll files not being found, not being able to find the proj.db file used by GDAL and various other messages about missing GDAL files.  Such messages often happen when the PATH environment variable does not include the GDAL installation folders.  See the discussion in the GDAL / OGR topic on setting the PATH environment variable.  Other causes might be an incomplete GDAL installation package or other problems.  


File - Import -  This topic creates a data source using GDAL.   A simpler procedure is to use File - Import, as shown in the Example: Import ERDAS GIS with GDAL and Assign Coordinate System topic.


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.  Recent versions of GDAL supported by Manifold 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.


GDAL is not Manifold - When connecting to GDB using GDAL/OGR we must be aware we are no longer using Manifold code but instead are using GDAL code.  GDAL has earned a good reputation.  It is a tremendous advantage to use GDAL's very broad reach of modules from Manifold to connect to many niche or nearly-extinct formats, and GDAL does a great job at that.  However, GDAL's code in general is not as bulletproof as the Radian technology used in Manifold.  Connections using GDAL fall outside of Manifold's reputation for never crashing.      

See Also





Web Servers


Select Pane




Example: Spectacular Images and Data from Web Servers - A must see topic providing a gallery of views illustrating how Manifold can use web servers such as imageservers and other free resources to provide a seemingly endless selection of spectacular background maps, satellite images and GIS data with nearly zero effort.


Example: An Imageserver Tutorial - An extensive tutorial showing step by step how to add new data sources that are imageservers, how to show them as layers in a map, how to create a new drawing that matches the projection of the map and how to trace over what is seen in an imageserver layer to create an area object in the drawing.


Example: Import ERDAS GIS with GDAL and Assign Coordinate System  - A multistep example that covers import of an unwieldy format using GDAL, followed by use of Assign Initial Coordinate System and Repair Initial Coordinate System to deal quickly with real-life complications.


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 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 this topic.   Shows how to connect LibreOffice Base, the database part of LIbreOffice, through Manifold to link an ESRI GDB file geodatabase table into LibreOffice.


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