Skip to content
Permalink
Browse files
Better fix for crs bug
git-svn-id: http://svn.osgeo.org/qgis/trunk@8348 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 14, 2008
1 parent fd84dcc commit 06d8dd3
Showing 1 changed file with 2 additions and 7 deletions.
@@ -125,9 +125,6 @@ QgsSpatialRefSys::QgsSpatialRefSys(const QgsSpatialRefSys &srs)
// Assignment operator
QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
{
OSRDestroySpatialReference( mSRS );
mSRS = OSRNewSpatialReference(NULL);

if (&srs != this)
{
mSrsId = srs.mSrsId;
@@ -141,10 +138,8 @@ QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
mIsValidFlag = srs.mIsValidFlag;
if(mIsValidFlag)
{
char *proj4src = NULL;
OSRExportToProj4(srs.mSRS, &proj4src);
OSRImportFromProj4(mSRS, proj4src);
CPLFree(proj4src);
OSRDestroySpatialReference(mSRS);
mSRS = OSRClone(srs.mSRS);
}
}
return *this;

0 comments on commit 06d8dd3

Please sign in to comment.