Skip to content

Commit

Permalink
Disable unused code on proj 6
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 4, 2019
1 parent 87d2d9e commit 0b52a37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -2064,6 +2064,7 @@ long QgsCoordinateReferenceSystem::getRecordCount()
return myRecordCount;
}

#if PROJ_VERSION_MAJOR<6
// adapted from gdal/ogr/ogr_srs_dict.cpp
bool QgsCoordinateReferenceSystem::loadWkts( QHash<int, QString> &wkts, const char *filename )
{
Expand Down Expand Up @@ -2195,6 +2196,7 @@ bool QgsCoordinateReferenceSystem::loadIds( QHash<int, QString> &wkts )

return true;
}
#endif

int QgsCoordinateReferenceSystem::syncDatabase()
{
Expand Down Expand Up @@ -2750,6 +2752,7 @@ int QgsCoordinateReferenceSystem::syncDatabase()
return updated + inserted;
}

#if PROJ_VERSION_MAJOR<6
bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString &dbPath )
{
const char *filename = CSVFilename( "datum_shift.csv" );
Expand Down Expand Up @@ -2946,6 +2949,7 @@ bool QgsCoordinateReferenceSystem::syncDatumTransform( const QString &dbPath )

return true;
}
#endif

QString QgsCoordinateReferenceSystem::geographicCrsAuthId() const
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -787,10 +787,13 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
*/
bool loadFromDatabase( const QString &db, const QString &expression, const QString &value );

#if PROJ_VERSION_MAJOR<6 // not used for proj >= 6.0
static bool loadIds( QHash<int, QString> &wkts );
static bool loadWkts( QHash<int, QString> &wkts, const char *filename );

//! Update datum shift definitions from GDAL data. Used by syncDb()
static bool syncDatumTransform( const QString &dbPath );
#endif

QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate> d;

Expand Down

0 comments on commit 0b52a37

Please sign in to comment.