Skip to content

Commit

Permalink
Don't include proj string in QgsCsException messages
Browse files Browse the repository at this point in the history
This is too costly to calculate, and results in a lot of processing
time when raster rendering transform errors occur (since they occur
on a one-by-one basis and in large quantities)
  • Loading branch information
nyalldawson committed Feb 17, 2020
1 parent ee4774a commit 5a60a4c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/qgscoordinatetransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -808,15 +808,11 @@ void QgsCoordinateTransform::transformCoords( int numPoints, double *x, double *
QString dir = ( direction == ForwardTransform ) ? QObject::tr( "forward transform" ) : QObject::tr( "inverse transform" );

#if PROJ_VERSION_MAJOR>=6
QgsProjUtils::proj_pj_unique_ptr src( proj_get_source_crs( QgsProjContext::get(), projData ) );
QgsProjUtils::proj_pj_unique_ptr dest( proj_get_source_crs( QgsProjContext::get(), projData ) );
QString msg = QObject::tr( "%1 of\n"
"%2"
"PROJ: %3\n"
"Error: %4" )
"Error: %3" )
.arg( dir,
points,
proj_as_proj_string( QgsProjContext::get(), projData, PJ_PROJ_5, nullptr ),
QString::fromUtf8( proj_errno_string( projResult ) ) );
#else
char *srcdef = pj_get_def( sourceProj, 0 );
Expand Down

0 comments on commit 5a60a4c

Please sign in to comment.