1. Home
  2. Knowledge Base
  3. General Troubleshooting
  4. Troubleshooting GDAL Installation Issue
  1. Home
  2. Knowledge Base
  3. GeoHECRAS
  4. Troubleshooting GDAL Installation Issue
  1. Home
  2. Knowledge Base
  3. HEC-RAS Model Troubleshooting
  4. Troubleshooting GDAL Installation Issue
  1. Home
  2. Knowledge Base
  3. Installation
  4. Troubleshooting GDAL Installation Issue
  1. Home
  2. Knowledge Base
  3. Working with a HEC-RAS Project
  4. Troubleshooting GDAL Installation Issue

Troubleshooting GDAL Installation Issue

The Geospatial Data Abstraction Library (GDAL) is a computer software library for reading and writing raster and vector geospatial data formats. The Hierarchical Data Format (HDF) is a data model, file format, and I/O library designed for storing, exchanging, and managing complex data including scientific, engineering, and remote sensing data. The latest HDF5 format allows the user to handle GDAL’s raster and vector geospatial data formats.

While loading GeoHECRAS or running an analysis of the HEC-RAS project, the user might encounter an uncommon error associated with GDAL or HDF5 project library files. Typically, this error occurs due to an outdated version of project libraries and their dependencies located in an incorrect system pathway.
GDAL/HDF5 initialization error during HEC-RAS analysis.It is common for multiple versions of the same dynamic-link library (DLL) to exist in different file system locations within an operating system (OS). You can control the specific location from which any given DLL is loaded by specifying a full path. However, if you do not use that method, then the system searches for the DLL at load time.

The Windows operating system strictly manages the dynamic-link libraries (DLLs) search order for security concerns related to potential computer viruses. This search order is outlined in the operating system’s hierarchy, as shown below.
Dynamic-link libraries (DLLs) search order

Unlike most software that associates all required project libraries in a single directory, GeoHECRAS uses a combination of modern and legacy code. To accommodate both 32-bit and 64-bit functionalities, separate directories for different versions of identical files are essential. Therefore, GeoHECRAS maintains bin32 and bin64 subfolders within the primary software installation, as well as bin32/bin64 directories within our GDAL folder. To ensure that the correct files are accessed, GeoHECRAS modifies the PATH environment variable at runtime for the active GeoHECRAS process exclusively, preventing adverse effects on other system operations.

However, adding these directories to the PATH constitutes the 6th search order, replaced by the 2nd and 4th DLL search order, as shown above. In certain instances, other programs incorrectly place their installed DLLs directly into these directories, hindering the use of different (newer) versions by other software.

Troubleshooting File Dependencies

To rectify the file dependencies issue, identifying and uninstalling the conflicting software can be challenging. In addition, diagnostic steps requiring administrator privileges on the local machine can help in this process. In regards to this issue, the directories of concern are:

  • C:\Windows
  • C:\Windows\System32
  • C:\Windows\SysWOW64

While the potential file conflicts can vary, you may inspect the following directories for the DLL files created on installing GeoHECRAS, as shown below:

C:\Program Files\CivilGEO\Shared\HDF\1.10.6.1\bin32
Or
C:\Program Files\CivilGEO\Shared\HDF\1.10.6.1\bin64
DLL files in GeoHECRAS software associated with GDAL and HDF formats.
C:\Program Files (x86)\CivilGEO\GeoHECRAS\HEC-RAS Engines\6.4.1\GDAL\bin32
Or
C:\Program Files (x86)\CivilGEO\GeoHECRAS\HEC-RAS Engines\6.4.1\GDAL\bin64
DLL files in GeoHECRAS software associated with GDAL and HDF formats.
The presence of the above-mentioned DLL files in the system directories is likely to conflict with certain GeoHECRAS processes.

If the initialization error of the GDAL path variables persists while using GeoHECRAS or during HEC-RAS analysis, the following measures can be taken to troubleshoot the situation:

Identifying Specific Discrepancies

  • Verify Installation Location: Ensure that the software is installed in the expected directory. Sometimes, accidental installation in a different location can lead to path discrepancies. Check the documentation or installer settings for the specified installation path.
  • Review Error Messages: During software installation, pay close attention to any error messages that mention “path,” “environment variable,” or similar terms. These messages often pinpoint the problematic variable or folder. For example, an error might say “The installer cannot find [specific file]. Make sure it is on the system path.

Checking GDAL Path Environment Variables

  • GDAL_DATA Variable: Check the “GDAL_DATA” environment variable to verify that it is correctly set. This variable should point to the directory where GDAL’s supporting data files are located. Refer to this article in our knowledge base for more information.
  • Path Variable: Confirm that the “Path” environment variable includes the path to the GDAL installation directory. This allows the system to locate GDAL executables and libraries.

Reconfiguring GDAL Path in GeoHECRAS

Access the settings or preferences related to GDAL within the GeoHECRAS software. Verify that the path specified for GDAL is accurate and matches the actual location of the GDAL installation on your system. Reconfigure the path if necessary.

Reinstalling/Updating Software

Consider reinstalling GeoHECRAS software or updating it to the latest version. Sometimes, software updates can fix known issues related to environment variables. This step is crucial if the current GDAL installation is outdated or if errors persist despite previous software installations. Refer to this article in our knowledge base for more information.

Rebooting System

Perform a system restart after making any changes to the GDAL configuration. Sometimes, a reboot can resolve configuration-related issues by allowing the changes to take effect.

Note that the specific steps for resolution may vary based on individual system setups and the underlying cause of the error. If you are still having problems with this issue, contact our technical support. They will be glad to assist you further.

About the Author cxscvlgeo

  • Was this helpful?
  • YesNo

Was this article helpful?

Related Articles