File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -425,12 +425,17 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString theProj4String
425
425
{
426
426
// Last ditch attempt to piece together what we know of the projection to find a match...
427
427
QgsDebugMsg ( " globbing search for srsid from this proj string" );
428
+ setProj4String ( theProj4String );
428
429
mySrsId = findMatchingProj ();
429
430
QgsDebugMsg ( " globbing search for srsid returned srsid: " + QString::number ( mySrsId ) );
430
431
if ( mySrsId > 0 )
431
432
{
432
433
createFromSrsId ( mySrsId );
433
434
}
435
+ else
436
+ {
437
+ mIsValidFlag = false ;
438
+ }
434
439
}
435
440
}
436
441
@@ -771,7 +776,8 @@ long QgsCoordinateReferenceSystem::findMatchingProj()
771
776
QgsDebugMsg ( " entered." );
772
777
if ( mEllipsoidAcronym .isNull () || mProjectionAcronym .isNull () || !mIsValidFlag )
773
778
{
774
- QgsDebugMsg ( " QgsCoordinateReferenceSystem::findMatchingProj will only work if prj acr ellipsoid acr and proj4string are set!..." );
779
+ QgsDebugMsg ( " QgsCoordinateReferenceSystem::findMatchingProj will only work if prj acr ellipsoid acr and proj4string are set"
780
+ " and the current projection is valid!" );
775
781
return 0 ;
776
782
}
777
783
You can’t perform that action at this time.
0 commit comments