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", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265, AUTHORITY["EPSG","7011"]], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.33722917], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4807"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.8], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99987742], PARAMETER["false_easting",600000], PARAMETER["false_northing",2200000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","27582"]] Origin = (601499.999999999420000,2428999.999999997700000) Pixel Size = (0.125000000000000,-0.125000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: COMPRESSION=PACKBITS INTERLEAVE=BAND Corner Coordinates: Upper Left ( 601500.000, 2429000.000) ( 0d 1'13.55"E, 48d51'33.85"N) Lower Left ( 601500.000, 2428500.000) ( 0d 1'13.54"E, 48d51'17.67"N) Upper Right ( 602000.000, 2429000.000) ( 0d 1'38.07"E, 48d51'33.84"N) Lower Right ( 602000.000, 2428500.000) ( 0d 1'38.06"E, 48d51'17.66"N) Center ( 601750.000, 2428750.000) ( 0d 1'25.80"E, 48d51'25.75"N) Band 1 Block=4000x1 Type=Byte, ColorInterp=Palette Color Table (RGB with 256 entries) 0: 31,45,31,255 1: 30,52,40,255 2: 41,50,29,255 3: 39,46,35,255 4: 44,57,42,255 To read it I started from the example of the gdal website : http://www.gdal.org/gdal_tutorial.html 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 ? Best regards, François
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev