[gdal-dev] Problem with GDALGetProjectionRef

Frank Warmerdam warmerdam at pobox.com
Mon Aug 24 15:57:51 EDT 2009


Florian Hillen wrote:
> gdalinfo delivers the right projection:
> 
> PROJCS["unnamed",
>     GEOGCS["DHDN",
>         DATUM["Deutsches_Hauptdreiecksnetz",
>             SPHEROID["Bessel 1841",6377397.155,299.1528128000009,
>                 AUTHORITY["EPSG","7004"]],
>             AUTHORITY["EPSG","6314"]],
> [...]
> 
> GDALGetProjectionRef delivers the following WKT string (some of you know
> this from some earlier mails):
> 
> PROJCS["unnamed",
> GEOGCS["DHDN",
> DATUM["unknown",
> SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4314"]],
> [...]
> 
> In the earlier mails I thought that the warp doesn't work correct, but
> apparently the warp is correct, because I use the same file for gdalinfo
> and in my plugin. So the problem must be GDALGetProjectionRef!?

Florian,

Two possibilities come to mind.

1) In your plugin the environment isn't correct and some .csv lookups
are failing which are used to fill out the datum information.

2) You are using a different version of GDAL in your plugin and it has
slightly different code for handling the coordinate system.

There is no apparent problem with the code you included.

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