[QGIS Commit] r8348 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Apr 14 02:53:31 EDT 2008


Author: mhugent
Date: 2008-04-14 02:53:30 -0400 (Mon, 14 Apr 2008)
New Revision: 8348

Modified:
   trunk/qgis/src/core/qgsspatialrefsys.cpp
Log:
Better fix for crs bug

Modified: trunk/qgis/src/core/qgsspatialrefsys.cpp
===================================================================
--- trunk/qgis/src/core/qgsspatialrefsys.cpp	2008-04-13 17:15:04 UTC (rev 8347)
+++ trunk/qgis/src/core/qgsspatialrefsys.cpp	2008-04-14 06:53:30 UTC (rev 8348)
@@ -125,9 +125,6 @@
 // Assignment operator
 QgsSpatialRefSys& QgsSpatialRefSys::operator=(const QgsSpatialRefSys& srs)
 {
-  OSRDestroySpatialReference( mSRS );
-  mSRS = OSRNewSpatialReference(NULL);
-  
   if (&srs != this)
   {
     mSrsId = srs.mSrsId;
@@ -141,10 +138,8 @@
     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;



More information about the QGIS-commit mailing list