Navigation Menu

Skip to content

Commit

Permalink
trim proj4 parameters for sql queries (#5598)
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennesky authored and jef-n committed May 21, 2012
1 parent b7f5c28 commit d11f0f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -523,9 +523,10 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String

// split on spaces followed by a plus sign (+) to deal
// also with parameters containing spaces (e.g. +nadgrids)
// make sure result is trimmed (#5598)
foreach( QString param, theProj4String.split( QRegExp( "\\s+(?=\\+)" ), QString::SkipEmptyParts ) )
{
QString arg = QString( "' '||parameters||' ' LIKE %1" ).arg( quotedValue( QString( "% %1 %" ).arg( param ) ) );
QString arg = QString( "' '||parameters||' ' LIKE %1" ).arg( quotedValue( QString( "% %1 %" ).arg( param.trimmed() ) ) );
if ( param.startsWith( "+datum=" ) )
{
datum = arg;
Expand Down

0 comments on commit d11f0f5

Please sign in to comment.