Example: Connect to an ESRI GDB usng GDAL/OGR

Radian 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 Radian's own internal code, with no need to install any additional software.  


In addition, Radian includes a dataport that can launch the GDAL/OGR libraries to connect to any format those libraries support.   For a discussion of the GDAL/OGR libraries please see the Example: Connect to Radian from QGIS topic.   


Both the Radian 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 Radian 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 Radian supports that GDAL/OGR does not, and there are formats available within GDAL/OGR that Radian does not include as a built-in to Radian.


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


In this example we will use GDAL to get data from a file that uses an obsolete ESRI file geodatabase format.   Radian 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 we first have to install it in Windows, and then we can use it from Radian.


Installing GDAL/OGR

To use GDAL/OGR the Radian GDAL dataport requires installation on our machine of the GDAL/OGR libraries, plus any optional GDAL/OGR modules we want to use.   Radian is happy to work with third party software like GDAL/OGR but Radian by default does not automatically install that third party software.   Testing shows the biggest problem users have with using the GDAL/OGR dataport is getting GDAL installed on their machine and the Windows PATH environmental variable updated to include their location.  


Visit gdal.org for information on obtaining the GDAL/OGR installation packages for Windows.  Gdal.org does not provide binary installation packages for Windows but the site does provide links to third party sites that do provide downloads.   


This example uses installation packages downloaded from the GISInternals.com site.  Manifold makes no guarantees these are safe to use or do not contain malware.  The GISInternals.com site does not provide SHA codes to verify integrity of the download.   Users who are concerned about downloading and installing unverified binaries from third party sites should study the gdal.org site to learn how to obtain source code for GDAL/OGR. Users can then apply their own or hired software development skills to create their own Windows installation packages.



The objective is to get a set of .msi Windows Installer packages like the above.   In most cases there will be several installation packages, usually one for most GDAL/OGR capabilities plus additional modules that GDAL calls "plugins" or optional modules, usually providing code based on SDKs or licensed code from third parties.    For example, based on their names the modules seen above appear to provide code for ECW format reading that seems to derive from the Hexagon Geospatial SDK, file database GDB reading code from ESRI, MrSID reading code from Lizardtech, and software from Oracle.   Users are advised to take care to honor the various licenses attached to such various optional modules.


For the purposes of this example topic, the core package seen above was installed into a folder called C:\Program Files\GDAL.   All of the other modules were then installed giving the same folder location for installation.  




After installation, in Windows Explorer we see that many files were installed into that folder, including some .dll files at the folder root.




In addition, many other .dll files were installed in the gdalplugins sub-folder.   


Adding GDAL to the PATH Environment Variable

For GDAL/OGR to be usable by other programs, such as Radian, the locations of necessary .dll files must be part of the system PATH environment variable.  The PATH variable tells Windows where to look for executables.   This example shows Windows 10.



To add the installation folders for our GDAL .dll files to the PATH we launch the System applet in the Windows Control Panel.   Click on Advanced system settings.




In the resultant System Properties dialog click on Environmental Variables.  




In the System variables pane of the resultant dialog, click on Path to highlight that entry and choose Edit.




Click New and then add C:\Program Files\GDAL and then click New again and add C:\Program Files\GDAL\gdalplugins.   These are the two folders in which .dll files appeared when we installed the GDAL/OGR packages specifying as an installation folder the C:\Program Files\GDAL  folder.    Of course, if we chose different folders when we installed the GDAL/OGR packages we would specify those different folders.  Press OK.


Do we really need to add both folders to the PATH?  We do not know and do not need to care.  It is easier to simply add both than to try to puzzle out how GDAL works and what is necessary and what is not.   


Using GDAL from Radian to Import an "Old" GDB

The above were all just preliminary steps to install GDAL/OGR.   Now we can get on with life and use GDAL from Radian.  


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.


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



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




A simple way to get around that is to enter gdb into the dialog's filter box, as see above, so only files with a name that includes the letters gdb are displayed.  That makes it easy to find and to click onto the gdb file.   Press Open.




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




Radian 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 Radian project.  Now would be a good time to save the project.


Using GDAL from Radian to Import a Shapefile

Because both GDAL/OGR and Radian each have a vast library of formats they know, in many cases formats are supported both by Radian native capabilities and also within GDAL.   If we want to import a format, such as shapefiles, that Radian knows but we want to use GDAL code instead of Radian native code we can do that.  


To connect to a shapefile using GDAL instead of native Radian shapefile capabilities we choose File - Create - New Data Source.  




We specify a the Name we want to use for the new data source and a Type of File: gdal.   Click the [...] browse button.




We browse into the folder where the desired shapefile is located and click it to highlight it and to enter the name into the File name box.  Click Open.




Back in the New Data Source dialog, click Create Data Source.




Radian creates a new data source named as we specified.  Expanding the data source and double-clicking on the drawing we open it to see that Radian has connected through GDAL to the shapefile we want.


GDAL connections are always read-only, so we cannot edit this drawing.    If we want an editable version we should copy the drawing and the drawing's table and paste them into the project outside of the data source.



Limitations: Using GDAL/OGR has limitations compared to a native Radian format:   



Benefits:  Using GDAL/OGR has benefits as well:


See Also





Web Servers


Select Dialog


View - Fields


Example: Spectacular Images and Data from Web Servers - A must see topic providing a gallery of views illustrating how Radian 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: 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 Radian from Release 8 - Step by step procedure to connect from Manifold System Release 8 to a Radian .map file using Radian's ODBC driver.


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


Example: Connect Through Radian ODBC to a Third Party -  With Release 8, use an ODBC connection to a Radian .map to connect through the .map project to a third party, external data source, an ESRI GDB file geodatabase.  We use Radian 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 Radian to an ESRI GDB - A companion example topic to this topic.   Shows how to connect LibreOffice Base, the database part of LIbreOffice, through Radian to link an ESRI GDB file geodatabase table into LibreOffice.


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