<br><br><div class="gmail_quote">2009/5/7 brettwiesner <span dir="ltr">&lt;<a href="mailto:brettwiesner@gmail.com">brettwiesner@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes that&#39;s the error message. It goes on the say somthing about trying to find gcs.csv which is there but since it can&#39;t find the env var, it doesn&#39;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.<br>

</blockquote><div><br>Hi,<br><br>I&#39;m afraid you won&#39;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.<br>
 <br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Is there some code I can write that can tell me what gdal thinks the GDAL_DATA env var is set to?<div><div></div><div class="h5"></div></div></blockquote><div><br>You should instead use SetConfigOption or PushFinderLocation (both exposed to the SWIG API) for this purpose.<br>
<br><br>Best regards,<br><br>Tamas<br></div></div><br>