Skip to content
Permalink
Browse files

trim proj4 parameters for sql queries (#5598)

  • Loading branch information
etiennesky committed May 19, 2012
1 parent 56808d9 commit e3f25dae870545c5db6f36f47cf8caef8321a520
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgscoordinatereferencesystem.cpp
@@ -496,9 +496,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;

0 comments on commit e3f25da

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