Skip to content

Commit 26160c9

Browse files
authoredJul 26, 2016
Merge pull request #3332 from nyalldawson/transform2
Remove the extra QgsCoordinateTransform constructors
2 parents 6c0d97a + 4a3924c commit 26160c9

File tree

4 files changed

+3
-68
lines changed

4 files changed

+3
-68
lines changed
 

‎doc/api_break.dox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ called if changes are made to the CRS database.</li>
130130
<ul>
131131
<li>QgsCoordinateTransform is no longer a QObject. readXml, writeXml and initialise are all normal public members now,
132132
not slots. The invalidTransformInput() signal has been removed.</li>
133+
<li>The extra QgsCoordinateTransform constructors (those not taking QgsCoordinateReferenceSystem arguments) have been
134+
removed. Now, QgsCoordinateTransform must be created using an already existing source and destination
135+
QgsCoordinateReferenceSystem object.</li>
133136
<li>QgsCoordinateTransform::clone() has been removed. Just use direct copies instead.</li>
134137
<li>sourceCrs() and destCrs() now return a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
135138
plugins calling these methods will need to be updated.</li>

‎python/core/qgscoordinatetransform.sip

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,6 @@ class QgsCoordinateTransform
3939
QgsCoordinateTransform( const QgsCoordinateReferenceSystem& source,
4040
const QgsCoordinateReferenceSystem& destination );
4141

42-
/** Constructs a QgsCoordinateTransform using CRS ID of source and destination CRS */
43-
QgsCoordinateTransform( long sourceSrsId, long destinationSrsId );
44-
45-
/*!
46-
* Constructs a QgsCoordinateTransform using the Well Known Text representation
47-
* of the layer and map canvas coordinate systems
48-
* @param sourceWkt WKT, typically of the layer's coordinate system
49-
* @param destinationWkt WKT, typically of the map canvas coordinate system
50-
*/
51-
QgsCoordinateTransform( const QString& sourceWkt, const QString& destinationWkt );
52-
53-
/*!
54-
* Constructs a QgsCoordinateTransform using a Spatial Reference Id
55-
* of the layer and map canvas coordinate system as Wkt
56-
* @param sourceSrid Spatial Ref Id of the layer's coordinate system
57-
* @param destinationWkt Wkt of the map canvas coordinate system
58-
* @param sourceCRSType On of the enum members defined in QgsCoordinateReferenceSystem::CrsType
59-
*/
60-
QgsCoordinateTransform( long sourceSrid,
61-
const QString& destinationWkt,
62-
QgsCoordinateReferenceSystem::CrsType sourceCRSType = QgsCoordinateReferenceSystem::PostgisCrsId );
63-
6442
/*!
6543
* Returns true if the coordinate transform is valid, ie both the source and destination
6644
* CRS have been set and are valid.

‎src/core/qgscoordinatetransform.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,6 @@ QgsCoordinateTransform::QgsCoordinateTransform( const QgsCoordinateReferenceSyst
5050
d = new QgsCoordinateTransformPrivate( source, destination );
5151
}
5252

53-
QgsCoordinateTransform::QgsCoordinateTransform( long sourceSrsId, long destinationSrsId )
54-
{
55-
d = new QgsCoordinateTransformPrivate( QgsCoordinateReferenceSystem::fromSrsId( sourceSrsId ),
56-
QgsCoordinateReferenceSystem::fromSrsId( destinationSrsId ) );
57-
}
58-
59-
QgsCoordinateTransform::QgsCoordinateTransform( const QString& sourceWkt, const QString& destinationWkt )
60-
{
61-
d = new QgsCoordinateTransformPrivate( QgsCoordinateReferenceSystem::fromWkt( sourceWkt ),
62-
QgsCoordinateReferenceSystem::fromWkt( destinationWkt ) );
63-
}
64-
65-
66-
QgsCoordinateTransform::QgsCoordinateTransform( long sourceSrid,
67-
const QString& destinationWkt,
68-
QgsCoordinateReferenceSystem::CrsType sourceCrsType )
69-
{
70-
QgsCoordinateReferenceSystem sourceCrs;
71-
sourceCrs.createFromId( sourceSrid, sourceCrsType );
72-
73-
d = new QgsCoordinateTransformPrivate( sourceCrs, QgsCoordinateReferenceSystem::fromWkt( destinationWkt ) );
74-
}
75-
7653
void QgsCoordinateTransform::setSourceCrs( const QgsCoordinateReferenceSystem& crs )
7754
{
7855
d.detach();

‎src/core/qgscoordinatetransform.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,6 @@ class CORE_EXPORT QgsCoordinateTransform
6262
QgsCoordinateTransform( const QgsCoordinateReferenceSystem& source,
6363
const QgsCoordinateReferenceSystem& destination );
6464

65-
/** Constructs a QgsCoordinateTransform using CRS ID of source and destination CRS */
66-
QgsCoordinateTransform( long sourceSrsId, long destinationSrsId );
67-
68-
/*!
69-
* Constructs a QgsCoordinateTransform using the Well Known Text representation
70-
* of the layer and map canvas coordinate systems
71-
* @param sourceWkt WKT, typically of the layer's coordinate system
72-
* @param destinationWkt WKT, typically of the map canvas coordinate system
73-
*/
74-
QgsCoordinateTransform( const QString& sourceWkt, const QString& destinationWkt );
75-
76-
/*!
77-
* Constructs a QgsCoordinateTransform using a Spatial Reference Id
78-
* of the layer and map canvas coordinate system as Wkt
79-
* @param sourceSrid Spatial Ref Id of the layer's coordinate system
80-
* @param destinationWkt Wkt of the map canvas coordinate system
81-
* @param sourceCrsType On of the enum members defined in QgsCoordinateReferenceSystem::CrsType
82-
*/
83-
QgsCoordinateTransform( long sourceSrid,
84-
const QString& destinationWkt,
85-
QgsCoordinateReferenceSystem::CrsType sourceCrsType = QgsCoordinateReferenceSystem::PostgisCrsId );
86-
87-
8865
/*!
8966
* Returns true if the coordinate transform is valid, ie both the source and destination
9067
* CRS have been set and are valid.

0 commit comments

Comments
 (0)
Please sign in to comment.