Changeset 14758

Show
Ignore:
Timestamp:
06/23/08 23:56:24 (5 months ago)
Author:
warmerdam
Message:

Attempt to preserve PROJCS name in sMapInfo.proName, and to capture it as
the PROJCS name when reading. This will hopefully preserve symbolic names
like NAD_1983_StatePlane_Ohio_South_FIPS_3402_Feet instead of replacing them
with something generic like "Lambert_Conformal_Conic" (#2422).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.5/gdal/frmts/hfa/hfadataset.cpp

    r13585 r14758  
    18911891/*      MapInfo                                                         */ 
    18921892/* -------------------------------------------------------------------- */ 
    1893  
    1894     if( bHaveSRS && sPro.proName != NULL ) 
     1893    const char *pszPROJCS = oSRS.GetAttrValue( "PROJCS" ); 
     1894 
     1895    if( pszPROJCS ) 
     1896        sMapInfo.proName = (char *) pszPROJCS; 
     1897    else if( bHaveSRS && sPro.proName != NULL ) 
    18951898        sMapInfo.proName = sPro.proName; 
    18961899    else 
     
    20362039/* -------------------------------------------------------------------- */ 
    20372040/*      General case for Erdas style projections.                       */ 
     2041/*                                                                      */ 
     2042/*      We make a particular effort to adapt the mapinfo->proname as    */ 
     2043/*      the PROJCS[] name per #2422.                                    */ 
    20382044/* -------------------------------------------------------------------- */ 
    20392045    psDatum = HFAGetDatum( hHFA ); 
     
    20562062    } 
    20572063 
     2064    else if( psPro->proNumber != EPRJ_LATLONG 
     2065             && psMapInfo != NULL ) 
     2066    { 
     2067        oSRS.SetProjCS( psMapInfo->proName ); 
     2068    } 
    20582069    else if( psPro->proNumber != EPRJ_LATLONG ) 
    20592070    {