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.Combine(Path.GetDirectoryName(this.GetType().Assembly.Location),"Gdalbin")
;
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,
"data"));
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 :)
/Tomas