Tamas and Frank,<br><br>Thank you both for your replies. I tried Tamas' suggestion and found the same problem. I suspect that my problem is that it is not finding the correct CSV files as Frank suggested. Because I am using the prebuilt binaries from FWTools, I have been copying the DLL files (e.g., gdal_csharp) into my c# application directories (debug/release) but linking to support files by simply including the appropriate directories (in my case: C:\Program Files\FWTools1.3.9\bin\;C:\Program Files\FWTools1.3.9) in the PATH environment variable. I am guessing that this works fine for libraries but does not help it locate the CSV files, is that correct? What is the right way to tell a C# application where/how to find these files? My apologies if this is a super basic question or has been answered repeated on this list - I am obviously new to this...<br>
<br>Any insights would be greatly appreciated.<br><br>- Kerry<br><br><div class="gmail_quote">On Tue, Apr 1, 2008 at 8:16 AM, Frank Warmerdam <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Kerry Halligan wrote:<br>
> Can anyone help me out with problems reading the correct projection<br>
> information from a TIFF image?<br>
><br>
> I am using GDAL C# bindings from FWTools (1.3.9) and am getting unexpected<br>
> results for projection information of TIFF files. If I use the gdalinfo<br>
> utility I get the correct information, but if I use the gdal_csharp bindings<br>
> I get "unnamed" as the projection. This is causing difficulty when<br>
> comparing projections before processing multiple files. I am assuming this<br>
> is a data and/or operator error, rather than a bug, but can anyone tell me<br>
> what I might be doing wrong? I also tried this with the most recent version<br>
> of FWTools and received the same results.<br>
><br>
</div>...<br>
> *csharp code:<br>
<div class="Ih2E3d">><br>
> Gdal.AllRegister();<br>
> Dataset ds = Gdal.Open(infile, Access.GA_ReadOnly);<br>
> // get the projection<br>
> string proj = ds.GetProjection();<br>
><br>
> printing 'proj' produces:<br>
> *<br>
> "PROJCS[\"unnamed\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS<br>
> 1980\",6378137,298.2572221010002<br>
> ,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",<br>
> 0.0174532925199433],AUTHORITY[\"EPSG\",\"4269\"]],UNIT[\"US survey foot\",<br>
> 0.3048006096012192<br>
> ,AUTHORITY[\"EPSG\",\"9003\"]],AUTHORITY[\"EPSG\",\"26954\"]]"<br>
<br>
</div>Kerry,<br>
<br>
I imagine this is due to either the GDAL_DATA or perhaps the GEOTIFF_CSV<br>
environment variable not pointing to the proper .csv files. The GeoTIFF<br>
driver uses these to expand some coordinate systems in GeoTIFF defined<br>
based on only an EPSG code. For some such common coordinate systems<br>
there is logic to expand them without the .csv files but some info<br>
(such as the projection name) may be lost. I presume this is what is<br>
happening to you.<br>
<br>
Note the FWTools Shell takes some effort to setup the environment<br>
carefully.<br>
<br>
Best regards,<br>
<font color="#888888"><br>
--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | President OSGeo, <a href="http://osgeo.org" target="_blank">http://osgeo.org</a><br>
<br>
</font></blockquote></div><br>