Skip to content

Commit

Permalink
geo_normalize.c: avoid look up of user-defined geokeys that cause PRO…
Browse files Browse the repository at this point in the history
…J warnings (fixes OSGeo/gdal#2321)
  • Loading branch information
rouault committed Mar 27, 2020
1 parent 8feb012 commit e06625c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions libgeotiff/geo_normalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ int GTIFGetPCSInfoEx( void* ctxIn,
}
}

if( nPCSCode == KvUserDefined )
return FALSE;

{
char szCode[12];
PJ* proj_crs;
Expand Down Expand Up @@ -446,6 +449,10 @@ int GTIFGetGCSInfoEx( void* ctxIn,
return TRUE;
}


if( nGCSCode == KvUserDefined )
return FALSE;

/* -------------------------------------------------------------------- */
/* Search the database. */
/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -634,6 +641,9 @@ int GTIFGetEllipsoidInfoEx( void* ctxIn,
return TRUE;
}

if( nEllipseCode == KvUserDefined )
return FALSE;

/* -------------------------------------------------------------------- */
/* Search the database. */
/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -706,6 +716,10 @@ int GTIFGetPMInfoEx( void* ctxIn,
return TRUE;
}


if( nPMCode == KvUserDefined )
return FALSE;

/* -------------------------------------------------------------------- */
/* Search the database. */
/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -805,6 +819,9 @@ int GTIFGetDatumInfoEx( void* ctxIn,
return TRUE;
}

if( nDatumCode == KvUserDefined )
return FALSE;

/* -------------------------------------------------------------------- */
/* Search the database. */
/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -920,6 +937,9 @@ int GTIFGetUOMLengthInfoEx( void* ctxIn,
return TRUE;
}

if( nUOMLengthCode == KvUserDefined )
return FALSE;

/* -------------------------------------------------------------------- */
/* Search the units database for this unit. If we don't find */
/* it return failure. */
Expand Down Expand Up @@ -1428,6 +1448,9 @@ int GTIFGetProjTRFInfoEx( void* ctxIn,
return TRUE;
}

if( nProjTRFCode == KvUserDefined )
return FALSE;

{
int nProjMethod, i, anEPSGCodes[7];
double adfProjParms[7];
Expand Down

0 comments on commit e06625c

Please sign in to comment.