[gdal-dev] Re: GDAL C# bindings and TIFF read projection trouble

Tomas R monshi at home.se
Wed Apr 2 04:37:29 EDT 2008

Setting up GDAL to work in C# requires two settings:
1: Path to the GDAL libraries if those NOT are in the same folder as the 
calling libraries. If same folder, this step can be ignored. I use:
path = Environment.GetEnvironmentVariable("PATH");
installPath = 
path = installPath + ";" + path;
Environment.SetEnvironmentVariable("PATH", path);

2: Setting up GDAL so that it can find its supporting files, data file:
OSGeo.GDAL.Gdal.SetConfigOption("GDAL_DATA", Path.Combine(installPath, 

After this GDAL should be available to all calling functions in the 
running program. The setting of the path is only valid for the running 
process, it do not change the global path as it appears to other processes

Ohh, it feels nice to post as solution instead of a question :)


More information about the gdal-dev mailing list