We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8008185 commit 05c8c1eCopy full SHA for 05c8c1e
src/core/qgsspatialrefsys.cpp
@@ -125,9 +125,6 @@ QgsSpatialRefSys::QgsSpatialRefSys(const QgsSpatialRefSys &srs)
125
// Assignment operator
126
QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
127
{
128
- OSRDestroySpatialReference( mSRS );
129
- mSRS = OSRNewSpatialReference(NULL);
130
-
131
if (&srs != this)
132
133
mSrsId = srs.mSrsId;
@@ -141,10 +138,8 @@ QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
141
138
mIsValidFlag = srs.mIsValidFlag;
142
139
if(mIsValidFlag)
143
140
144
- char *proj4src = NULL;
145
- OSRExportToProj4(srs.mSRS, &proj4src);
146
- OSRImportFromProj4(mSRS, proj4src);
147
- CPLFree(proj4src);
+ OSRDestroySpatialReference(mSRS);
+ mSRS = OSRClone(srs.mSRS);
148
}
149
150
return *this;
0 commit comments