[Gdal-dev] GetProjectionRef() returns different strings in Win
and Linux
Frank Warmerdam
warmerdam at pobox.com
Wed Oct 1 09:44:20 EDT 2003
Ricardo Scachetti Pereira wrote:
> 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,
I don't know any obvious reason this would be failing only on windows. The
mostly likely problem is that the code somehow didn't find the prj.adf file
for some reason, but I don't know why.
If you can provide me with the dataset in a zip file, I could try reproducing
it here. Please send directly (not via the list).
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list