Skip to content
Permalink
Browse files

Fix build on proj < 6

(cherry picked from commit 84af693)
  • Loading branch information
nyalldawson committed Dec 16, 2019
1 parent ec167e8 commit 304f6f27c1196793c94f0785115c445ae1c39f39
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/app/qgscustomprojectiondialog.cpp
@@ -549,8 +549,8 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()
double longitude = eastWGS84->text().toDouble( &okE );

#if PROJ_VERSION_MAJOR<6
northing *= DEG_TO_RAD;
easting *= DEG_TO_RAD;
latitude *= DEG_TO_RAD;
longitude *= DEG_TO_RAD;
#endif

if ( !okN || !okE )
@@ -603,7 +603,7 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()
int projResult = proj_errno( res.get() );
#else
double z = 0.0;
int projResult = pj_transform( wgs84Proj, proj, 1, 0, &easting, &northing, &z );
int projResult = pj_transform( wgs84Proj, proj, 1, 0, &longitude, &latitude, &z );
#endif
if ( projResult != 0 )
{
@@ -628,8 +628,8 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()
isLatLong = pj_is_latlong( proj );
if ( isLatLong )
{
northing *= RAD_TO_DEG;
easting *= RAD_TO_DEG;
latitude *= RAD_TO_DEG;
longitude *= RAD_TO_DEG;
}
#endif
if ( isLatLong )

0 comments on commit 304f6f2

Please sign in to comment.
You can’t perform that action at this time.