File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -593,6 +593,7 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
593593 }
594594 }
595595
596+ QStringList myParam;
596597 if ( myRecord.empty () )
597598 {
598599 // match all parameters individually:
@@ -618,6 +619,7 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
618619 {
619620 sql += delim + arg;
620621 delim = " AND " ;
622+ myParam.append (param);
621623 }
622624 }
623625
@@ -637,9 +639,26 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
637639 {
638640 mySrsId = myRecord[" srs_id" ].toLong ();
639641 QgsDebugMsg ( " proj4string param match search for srsid returned srsid: " + QString::number ( mySrsId ) );
640- if ( mySrsId > 0 )
642+ // Bugfix 8487 : test param lists are equal, except for +datum
643+ myParam.sort ();
644+ QStringList foundParam;
645+ foreach ( QString paramfound, myRecord[" parameters" ].split ( QRegExp ( " \\ s+(?=\\ +)" ), QString::SkipEmptyParts ) )
641646 {
642- createFromSrsId ( mySrsId );
647+ if ( !paramfound.startsWith ( " +datum=" ) )
648+ foundParam.append (paramfound);
649+ }
650+ foundParam.sort ();
651+ if ( myParam == foundParam)
652+ {
653+ if ( mySrsId > 0 )
654+ {
655+ createFromSrsId ( mySrsId );
656+ }
657+ }
658+ else
659+ {
660+ // Params differ
661+ mIsValidFlag = false ;
643662 }
644663 }
645664 else
You can’t perform that action at this time.
0 commit comments