I have been running GDAL 201-1800 MSVC 2015 and GDAL-2.1.3-cp36-cp36m-win32.whl. I recently updated to GDAL 300 MSVC 2015 and GDAL‑3.0.1‑cp36‑cp36m‑win32.whl. My apps are built using c# in Visual Studio 2015. I am running 32 bit python 3.6. The apps are used in MapInfo v15.0. I am testing using console line commands.
The apps were running fine until I updated. Now when I am creating a report using data from a geotiff file I receive the following error: "Could not parse GDAL information for file " + aerialModel.pdffile .
The gdal path, geotiff file path and the aerialModel.pdffile values are correct. The values retrieved from the geotiff are correct.
This error is hit after adding the environmental variables and attempting to start a new process, the error message is thrown after the process.Start():
Process process = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo(); string gdalPath = null, output = null; fileName = "\"" + fileName + "\""; gdalPath = ConfigService.GetGdalPath(); startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = true; startInfo.RedirectStandardOutput = true; startInfo.RedirectStandardInput = true; startInfo.UseShellExecute = false; startInfo.Arguments = fileName; startInfo.FileName = Path.Combine(gdalPath, "gdalinfo.exe"); startInfo.EnvironmentVariables.Add("SDK_ROOT", gdalPath); startInfo.EnvironmentVariables.Add("GDAL_DATA", Path.Combine(gdalPath, "gdal-data")); startInfo.EnvironmentVariables.Add("GDAL_DRIVER_PATH", Path.Combine(gdalPath, "gdalplugins")); startInfo.EnvironmentVariables.Add("PROJ_LIB", Path.Combine(gdalPath, "projlib")); startInfo.EnvironmentVariables.Add("PYTHONPATH", Path.Combine(gdalPath, "python")); process = new Process(); process.StartInfo = startInfo; process.Start(); //Error Thrown, cannot start output = process.StandardOutput.ReadToEnd(); process.WaitForExit(); return output;
I have double checked all file paths exist and associated files including gdalinfo.exe exist, I have checked that all references exist, I have tried running against a variety of files that worked with the previous GDAL version.