Opened 18 years ago
Last modified 18 years ago
#1332 closed defect (worksforme)
UTM zone 10N is not recognized from the tif file
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | GDAL_Raster | Version: | 1.3.2 |
Severity: | major | Keywords: | |
Cc: |
Description
Hello Frank, we are having problems with the projection information in the .tif file. If I use FW tools 1.05 to check the tif file I see PROJCS["WGS 84 / UTM zone 10N"]..., however using GDAL 1.32v, GDALGetProjectionRef function returns PROJCS["unnamed" .... What I discovered is this piece of code in frmts\gtiff\gt_wkt_srs.cpp: .......... if( psDefn->PCS != KvUserDefined ) { if( GTIFGetPCSInfo( psDefn->PCS, &pszPCSName, NULL, NULL, NULL ) ) bNeedFree = TRUE; oSRS.SetNode( "PROJCS", pszPCSName ); if( bNeedFree ) GTIFFreeMemory( pszPCSName ); oSRS.SetAuthority( "PROJCS", "EPSG", psDefn->PCS ); } ......... Here, psDefn->PCS = 32610, but it is not giving the correct PROJCS name, because function GTIFGetPCSInfo tries to open non-existing pcs.csv file... However! there is include file epsg_pcs.inc, which contains code numbers for psDefn->PCS and it has correct definition: ValuePair(PCS_WGS84_UTM_zone_10N, 32610) My question would be why GDAL doesn't use these correct code numbers to return the PROJCS string?
Change History (2)
comment:2 by , 18 years ago
thanks, I didn't know about GDAL_DATA variable, it really solved the problem: CPLSetConfigOption("GDAL_DATA", gdal_data_path);
Note:
See TracTickets
for help on using tickets.