ogr/ogr_fromepsg.cpp
void OGREPSGDatumNameMassage( char ** ppszDatum )

{
    int         i, j;
    char        *pszDatum = *ppszDatum;

/* -------------------------------------------------------------------- */
/*      Translate non-alphanumeric values to underscores.               */
/* -------------------------------------------------------------------- */
    for( i = 0; pszDatum[i] != '\0'; i++ )
    {
        if( !(pszDatum[i] >= 'A' && pszDatum[i] <= 'Z')
            && !(pszDatum[i] >= 'a' && pszDatum[i] <= 'z')
            && !(pszDatum[i] >= '0' && pszDatum[i] <= '9') )
        {
            pszDatum[i] = '_';
        }
    }

/* -------------------------------------------------------------------- */
/*      Remove repeated and trailing underscores.                       */
/* -------------------------------------------------------------------- */
    for( i = 1, j = 0; pszDatum[i] != '\0'; i++ )
    {
        if( pszDatum[j] == '_' && pszDatum[i] == '_' )
            continue;

        pszDatum[++j] = pszDatum[i];
    }
    if( pszDatum[j] == '_' )
        pszDatum[j] = '\0';
    else
        pszDatum[j+1] = '\0';
    
/* -------------------------------------------------------------------- */
/*      Search for datum equivelences.  Specific massaged names get     */
/*      mapped to OpenGIS specified names.                              */
/* -------------------------------------------------------------------- */
    for( i = 0; papszDatumEquiv[i] != NULL; i += 2 )
    {
        if( EQUAL(*ppszDatum,papszDatumEquiv[i]) )
        {
            CPLFree( *ppszDatum );
            *ppszDatum = CPLStrdup( papszDatumEquiv[i+1] );
            break;
        }
    }
}
/************************************************************************/
/*                      OGREPSGDatumNameMassage()                       */
/*                                                                      */
/*      Massage an EPSG datum name into WMT format.  Also transform     */
/*      specific exception cases into WKT versions.                     */
/************************************************************************/
OGREPSGDatumNameMassage()
Massage an EPSG datum name into WMT format.  Also transform
specific exception cases into WKT versions.
OGREPSGDatumNameMassage () Massage an EPSG datum name into WMT format . Also transform specific exception cases into WKT versions .
void OGREPSGDatumNameMassage( char ** ppszDatum )
{
    int         i, j;
    char        *pszDatum = *ppszDatum;
    for( i = 0; pszDatum[i] != '\0'; i++ )
    {
        if( !(pszDatum[i] >= 'A' && pszDatum[i] <= 'Z')
            && !(pszDatum[i] >= 'a' && pszDatum[i] <= 'z')
            && !(pszDatum[i] >= '0' && pszDatum[i] <= '9') )
        {
            pszDatum[i] = '_';
        }
    }
    for( i = 1, j = 0; pszDatum[i] != '\0'; i++ )
    {
        if( pszDatum[j] == '_' && pszDatum[i] == '_' )
            continue;
        pszDatum[++j] = pszDatum[i];
    }
    if( pszDatum[j] == '_' )
        pszDatum[j] = '\0';
    else
        pszDatum[j+1] = '\0';
    for( i = 0; papszDatumEquiv[i] != NULL; i += 2 )
    {
        if( EQUAL(*ppszDatum,papszDatumEquiv[i]) )
        {
            CPLFree( *ppszDatum );
            *ppszDatum = CPLStrdup( papszDatumEquiv[i+1] );
            break;
        }
    }
}
void OGREPSGDatumNameMassage ( char * * ppszDatum ) { int i , j ; char * pszDatum = * ppszDatum ; for ( i = 0 ; pszDatum [ i ] != ' \0 ' ; i ++ ) { if ( ! ( pszDatum [ i ] >= ' ' && pszDatum [ i ] <= ' ' ) && ! ( pszDatum [ i ] >= ' ' && pszDatum [ i ] <= ' ' ) && ! ( pszDatum [ i ] >= ' ' && pszDatum [ i ] <= ' ' ) ) { pszDatum [ i ] = ' ' ; } } for ( i = 1 , j = 0 ; pszDatum [ i ] != ' \0 ' ; i ++ ) { if ( pszDatum [ j ] == ' ' && pszDatum [ i ] == ' ' ) continue ; pszDatum [ ++ j ] = pszDatum [ i ] ; } if ( pszDatum [ j ] == ' ' ) pszDatum [ j ] = ' \0 ' ; else pszDatum [ j + 1 ] = ' \0 ' ; for ( i = 0 ; papszDatumEquiv [ i ] != NULL ; i += 2 ) { if ( EQUAL ( * ppszDatum , papszDatumEquiv [ i ] ) ) { CPLFree ( * ppszDatum ) ; * ppszDatum = CPLStrdup ( papszDatumEquiv [ i + 1 ] ) ; break ; } } }
OGREPSGDatumNameMassage()
Massage an EPSG datum name into WMT format.
OGREPSGDatumNameMassage () Massage an EPSG datum name into WMT format .
/* -------------------------------------------------------------------- */ /*      Translate non-alphanumeric values to underscores.               */ /* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */ /*      Remove repeated and trailing underscores.                       */ /* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */ /*      Search for datum equivelences.  Specific massaged names get     */ /*      mapped to OpenGIS specified names.                              */ /* -------------------------------------------------------------------- */