[Gdal-dev] GetProjectionRef() returns different strings in Win and Linux

Ricardo Scachetti Pereira scachetti at videotron.ca
Tue Sep 30 10:32:43 EDT 2003


    Hello, all.

    I'm having a problem with method GDALDataset::GetProjectionRef() and 
I hope somebody can help me out.
    I'm trying to get the projection string from an ESRI grid and I'm 
getting different results in Linux and Windows (it's a cross-platform 
project).
    In Linux I get the correct projection string while in Windows I get 
an empty string ("", not NULL).
    The prj.adf file is the following:

Projection    GEOGRAPHIC
Datum         WGS84
Spheroid      WGS84
Units         DD
Zunits        NO
Parameters   

    The projection string returned by GDALDataset::GetProjectionRef() in 
Linux is:

GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4326"]]

    In Windows, the very same call returns an empty string.

    I'm using gdal-1.1.9 in both platforms, MS Visual C++ 6 in Windows 
and gcc 3.2.2 on a RedHat 9.1 Linux box.
    Any ideas about what is going on?
    Any help is greatly appreciated.
    Regards,

Ricardo





More information about the Gdal-dev mailing list