[georeferencer] Fix wrong target CRS using GDAL3/PROJ6 builds

This commit is contained in:
nirvn 2020-02-18 15:00:37 +07:00 committed by Mathieu Pellerin
parent eb247e301e
commit 5c95c5f7f3

View File

@ -97,7 +97,11 @@ bool QgsImageWarper::createDestinationDataset( const QString &outputName, GDALDa
if ( crs.isValid() )
{
OGRSpatialReference oTargetSRS;
#if PROJ_VERSION_MAJOR>=6
oTargetSRS.importFromWkt( crs.toWkt( QgsCoordinateReferenceSystem::WKT2_2018 ).toLatin1().data() );
#else
oTargetSRS.importFromProj4( crs.toProj().toLatin1().data() );
#endif
char *wkt = nullptr;
OGRErr err = oTargetSRS.exportToWkt( &wkt );