Thanks. That was it.

Tamas Szekeres wrote:


2009/5/7 brettwiesner <[email protected] <mailto:[email protected]>>

    Yes that's the error message. It goes on the say somthing about
    trying to find gcs.csv which is there but since it can't find the
    env var, it doesn't find the data. This is weird because I set the
    env var using the win32 function SetEnvironmentVariable() before
    the call to OGRSpatialReference is made. Since I was setting the
    variable and getting this message I suspected that GDAL_DATA was
    being read by something at startup.


Hi,

I'm afraid you won't be able to set the environment variable this way. GDAL is using getenv() to retrieve the value which operated on a local copy of the variables created when the process is started. By this means the env variable should be set before the process is spawned.

    Is there some code I can write that can tell me what gdal thinks
    the GDAL_DATA env var is set to?


You should instead use SetConfigOption or PushFinderLocation (both exposed to the SWIG API) for this purpose.


Best regards,

Tamas


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to