Changeset 12323

Show
Ignore:
Timestamp:
10/04/07 15:08:18 (1 year ago)
Author:
warmerdam
Message:

update project parm units (ie. fe/fn) according to linear units (#1730)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/frmts/raw/envidataset.cpp

    r12321 r12323  
    10801080        if( osDatumName.find_first_of("abcdefghijklmnopqrstuvwxyz" 
    10811081                                      "ABCDEFGHIJKLMNOPQRSTUVWXYZ")  
    1082                                       != std::string::npos ) 
     1082            != std::string::npos ) 
    10831083        { 
    10841084            SetENVIDatum( &oSRS, osDatumName ); 
     
    10951095/* -------------------------------------------------------------------- */ 
    10961096    if( EQUALN( papszFields[nCount-1],"units",5)) 
    1097        
     1097   
    10981098        /* Handle linear units first. */ 
    10991099        if (EQUAL(papszFields[nCount-1],"units=Feet") ) 
    1100             oSRS.SetLinearUnits( SRS_UL_FOOT, atof(SRS_UL_FOOT_CONV) ); 
     1100            oSRS.SetLinearUnitsAndUpdateParameters( SRS_UL_FOOT, atof(SRS_UL_FOOT_CONV) ); 
    11011101        else if (EQUAL(papszFields[nCount-1],"units=Meters") ) 
    1102             oSRS.SetLinearUnits( SRS_UL_METER, 1. ); 
     1102            oSRS.SetLinearUnitsAndUpdateParameters( SRS_UL_METER, 1. ); 
    11031103        else if (EQUAL(papszFields[nCount-1],"units=Km") ) 
    1104             oSRS.SetLinearUnits( "Kilometer", 1000.  ); 
     1104            oSRS.SetLinearUnitsAndUpdateParameters( "Kilometer", 1000.  ); 
    11051105        else if (EQUAL(papszFields[nCount-1],"units=Yards") ) 
    1106             oSRS.SetLinearUnits( "Yard", .9144 ); 
     1106            oSRS.SetLinearUnitsAndUpdateParameters( "Yard", .9144 ); 
    11071107        else if (EQUAL(papszFields[nCount-1],"units=Miles") ) 
    1108             oSRS.SetLinearUnits( "Mile", 1609.344 ); 
     1108            oSRS.SetLinearUnitsAndUpdateParameters( "Mile", 1609.344 ); 
    11091109        else if (EQUAL(papszFields[nCount-1],"units=Nautical Miles") ) 
    1110             oSRS.SetLinearUnits( SRS_UL_NAUTICAL_MILE, atof(SRS_UL_NAUTICAL_MILE_CONV) ); 
     1110            oSRS.SetLinearUnitsAndUpdateParameters( SRS_UL_NAUTICAL_MILE, atof(SRS_UL_NAUTICAL_MILE_CONV) ); 
    11111111             
    11121112        /* Only handle angular units if we know the projection is geographic. */ 
     
    11141114        { 
    11151115            if (EQUAL(papszFields[nCount-1],"units=Radians") ) 
    1116                    oSRS.SetAngularUnits( SRS_UA_RADIAN, 1. ); 
     1116                oSRS.SetAngularUnits( SRS_UA_RADIAN, 1. ); 
    11171117            else  
    11181118            {