[Gdal-dev] Trouble reading Geotiff projection
Frank Warmerdam
warmerdam at pobox.com
Wed Oct 8 15:45:57 EDT 2008
CELLIER François wrote:
> Hi everybody,
>
>
>
> I need to read geotiff with the gdal library. This geotif had no
> projection so I opened it through Global Mapper and Export it in order
> to have a projection within it. When I do a gdalinfo on the file I have :
>
>
>
> Driver: GTiff/GeoTIFF
>
> Files: testAvecProj.tif
>
> Size is 4000, 4000
>
> Coordinate System is:
>
> PROJCS["NTF (Paris) / France II",
...
>
> GDALAllRegister();
>
> this->_pGDALDataSet = (GDALDataset *) GDALOpen(
> _NomFichierImport.c_str(), GA_ReadOnly );
>
>
>
> In debug mode, the pszProjection field of _pGDALDataSet is :
>
> PROJCS[“unamed”,GEOGCS[“unamed”,DATUM[“unknown”,SPHEROID[“unretrievable’
> etc…
>
>
>
> Can someone tell me what I did wrong ?
François,
To get names like "NTF (Paris) / France II" for the coordinate system
strings from a GeoTIFF GDAL needs to lookup the geotiff codes in the
support files pcs.csv and gcs.csv normally living in gdal/data, and
installed in locations like /usr/local/share/gdal.
If they are not found you will get things like "unnamed". You may
find you need to set the GDAL_DATA environment variable to point to
the directory where these data files are found.
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