@@ -67,8 +67,8 @@ QgsCoordinateTransform::QgsCoordinateTransform( const QgsCoordinateReferenceSyst
6767QgsCoordinateTransform::QgsCoordinateTransform ( long theSourceSrsId, long theDestSrsId )
6868 : QObject()
6969 , mInitialisedFlag( false )
70- , mSourceCRS( theSourceSrsId, QgsCoordinateReferenceSystem::InternalCrsId )
71- , mDestCRS( theDestSrsId, QgsCoordinateReferenceSystem::InternalCrsId )
70+ , mSourceCRS( QgsCRSCache::instance()->crsBySrsId( theSourceSrsId ) )
71+ , mDestCRS( QgsCRSCache::instance()->crsBySrsId( theDestSrsId ) )
7272 , mSourceProjection( nullptr )
7373 , mDestinationProjection( nullptr )
7474 , mSourceDatumTransform( -1 )
@@ -86,8 +86,8 @@ QgsCoordinateTransform::QgsCoordinateTransform( const QString& theSourceCRS, con
8686 , mDestinationDatumTransform( -1 )
8787{
8888 setFinder ();
89- mSourceCRS . createFromWkt ( theSourceCRS );
90- mDestCRS . createFromWkt ( theDestCRS );
89+ mSourceCRS = QgsCRSCache::instance ()-> crsByWkt ( theSourceCRS );
90+ mDestCRS = QgsCRSCache::instance ()-> crsByWkt ( theDestCRS );
9191 // initialize the coordinate system data structures
9292 // XXX Who spells initialize initialise?
9393 // XXX A: Its the queen's english....
@@ -108,7 +108,7 @@ QgsCoordinateTransform::QgsCoordinateTransform( long theSourceSrid,
108108 setFinder ();
109109
110110 mSourceCRS .createFromId ( theSourceSrid, theSourceCRSType );
111- mDestCRS . createFromWkt ( theDestWkt );
111+ mDestCRS = QgsCRSCache::instance ()-> crsByWkt ( theDestWkt );
112112 // initialize the coordinate system data structures
113113 // XXX Who spells initialize initialise?
114114 // XXX A: Its the queen's english....
0 commit comments