Skip to content
Permalink
Browse files

trim proj4 parameters for sql queries (#5598)

  • Loading branch information
etiennesky authored and jef-n committed May 21, 2012
1 parent b7f5c28 commit d11f0f527756452d5c58af08204779307f3f0e32
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgscoordinatereferencesystem.cpp
@@ -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;

0 comments on commit d11f0f5

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