File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,6 @@ QgsSpatialRefSys::QgsSpatialRefSys(const QgsSpatialRefSys &srs)
125
125
// Assignment operator
126
126
QgsSpatialRefSys& QgsSpatialRefSys::operator =(const QgsSpatialRefSys& srs)
127
127
{
128
- OSRDestroySpatialReference ( mSRS );
129
- mSRS = OSRNewSpatialReference (NULL );
130
-
131
128
if (&srs != this )
132
129
{
133
130
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);
141
+ OSRDestroySpatialReference (mSRS );
142
+ mSRS = OSRClone (srs.mSRS );
148
143
}
149
144
}
150
145
return *this ;
You can’t perform that action at this time.
0 commit comments