ogr/ogr_fromepsg.cpp
int EPSGGetWGS84Transform( int nGeogCS, double *padfTransform )

{
    int         nMethodCode, iDXField, iField;
    char        szCode[32];
    const char *pszFilename = CSVFilename("gcs.csv");

/* -------------------------------------------------------------------- */
/*      Fetch the line from the GCS table.                              */
/* -------------------------------------------------------------------- */
    char **papszLine;

    sprintf( szCode, "%d", nGeogCS );
    papszLine = CSVScanFileByName( pszFilename,
                                   "COORD_REF_SYS_CODE", 
                                   szCode, CC_Integer );
    if( papszLine == NULL )
        return FALSE;

/* -------------------------------------------------------------------- */
/*      Verify that the method code is one of our accepted ones.        */
/* -------------------------------------------------------------------- */
    nMethodCode = 
        atoi(CSLGetField( papszLine,
                          CSVGetFileFieldId(pszFilename,
                                            "COORD_OP_METHOD_CODE")));
    if( nMethodCode != 9603 && nMethodCode != 9607 && nMethodCode != 9606 )
        return FALSE;

/* -------------------------------------------------------------------- */
/*      Fetch the transformation parameters.                            */
/* -------------------------------------------------------------------- */
    iDXField = CSVGetFileFieldId(pszFilename, "DX");

    for( iField = 0; iField < 7; iField++ )
        padfTransform[iField] = atof(papszLine[iDXField+iField]);

/* -------------------------------------------------------------------- */
/*      9607 - coordinate frame rotation has reverse signs on the       */
/*      rotational coefficients.  Fix up now since we internal          */
/*      operate according to method 9606 (position vector 7-parameter). */
/* -------------------------------------------------------------------- */
    if( nMethodCode == 9607 )
    {
        padfTransform[3] *= -1;
        padfTransform[4] *= -1;
        padfTransform[5] *= -1;
    }
        
    return TRUE;
}
/************************************************************************/
/*                       EPSGGetWGS84Transform()                        */
/*                                                                      */
/*      The following code attempts to find a bursa-wolf                */
/*      transformation from this GeogCS to WGS84 (4326).                */
/*                                                                      */
/*      Faults:                                                         */
/*       o I think there are codes other than 9603 and 9607 that        */
/*         return compatible, or easily transformed parameters.         */
/*       o Only the first path from the given GeogCS is checked due     */
/*         to limitations in the CSV API.                               */
/************************************************************************/
EPSGGetWGS84Transform()
The following code attempts to find a bursa-wolf
transformation from this GeogCS to WGS84 (4326).

o I think there are codes other than 9603 and 9607 that
return compatible, or easily transformed parameters.
o Only the first path from the given GeogCS is checked due
to limitations in the CSV API.
EPSGGetWGS84Transform () The following code attempts to find a bursa - wolf transformation from this GeogCS to WGS84 ( 4326 ) . o I think there are codes other than 9603 and 9607 that return compatible or easily transformed parameters . o Only the first path from the given GeogCS is checked due to limitations in the CSV API .
int EPSGGetWGS84Transform( int nGeogCS, double *padfTransform )
{
    int         nMethodCode, iDXField, iField;
    char        szCode[32];
    const char *pszFilename = CSVFilename("gcs.csv");
    char **papszLine;
    sprintf( szCode, "%d", nGeogCS );
    papszLine = CSVScanFileByName( pszFilename,
                                   "COORD_REF_SYS_CODE", 
                                   szCode, CC_Integer );
    if( papszLine == NULL )
        return FALSE;
    nMethodCode = 
        atoi(CSLGetField( papszLine,
                          CSVGetFileFieldId(pszFilename,
                                            "COORD_OP_METHOD_CODE")));
    if( nMethodCode != 9603 && nMethodCode != 9607 && nMethodCode != 9606 )
        return FALSE;
    iDXField = CSVGetFileFieldId(pszFilename, "DX");
    for( iField = 0; iField < 7; iField++ )
        padfTransform[iField] = atof(papszLine[iDXField+iField]);
    if( nMethodCode == 9607 )
    {
        padfTransform[3] *= -1;
        padfTransform[4] *= -1;
        padfTransform[5] *= -1;
    }
    return TRUE;
}
int EPSGGetWGS84Transform ( int nGeogCS , double * padfTransform ) { int nMethodCode , iDXField , iField ; char szCode [ 32 ] ; const char * pszFilename = CSVFilename ( " " ) ; char * * papszLine ; sprintf ( szCode , " " , nGeogCS ) ; papszLine = CSVScanFileByName ( pszFilename , " " , szCode , CC_Integer ) ; if ( papszLine == NULL ) return FALSE ; nMethodCode = atoi ( CSLGetField ( papszLine , CSVGetFileFieldId ( pszFilename , " " ) ) ) ; if ( nMethodCode != 9603 && nMethodCode != 9607 && nMethodCode != 9606 ) return FALSE ; iDXField = CSVGetFileFieldId ( pszFilename , " " ) ; for ( iField = 0 ; iField < 7 ; iField ++ ) padfTransform [ iField ] = atof ( papszLine [ iDXField + iField ] ) ; if ( nMethodCode == 9607 ) { padfTransform [ 3 ] *= -1 ; padfTransform [ 4 ] *= -1 ; padfTransform [ 5 ] *= -1 ; } return TRUE ; }
EPSGGetWGS84Transform()
The following code attempts to find a bursa-wolf
transformation from this GeogCS to WGS84 (4326).
EPSGGetWGS84Transform () The following code attempts to find a bursa - wolf transformation from this GeogCS to WGS84 ( 4326 ) .
/* -------------------------------------------------------------------- */ /*      Fetch the line from the GCS table.                              */ /* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */ /*      Verify that the method code is one of our accepted ones.        */ /* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */ /*      Fetch the transformation parameters.                            */ /* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */ /*      9607 - coordinate frame rotation has reverse signs on the       */ /*      rotational coefficients.  Fix up now since we internal          */ /*      operate according to method 9606 (position vector 7-parameter). */ /* -------------------------------------------------------------------- */