@@ -82,6 +82,9 @@ class CORE_EXPORT QgsCoordinateTransformContext
82
82
* Returns the stored mapping for source CRS to associated datum transform to use.
83
83
* The map keys will be QgsCoordinateReferenceSystems::authid()s.
84
84
*
85
+ * A datum transform of -1 indicates that no datum transform is required for the
86
+ * source CRS.
87
+ *
85
88
* \warning This method should not be used to calculate the corresponding datum transforms
86
89
* to use for a coordinate transform. Instead, always use calculateDatumTransforms()
87
90
* to determine this.
@@ -95,7 +98,8 @@ class CORE_EXPORT QgsCoordinateTransformContext
95
98
* Adds a new \a transform to use when projecting coordinates from the specified source
96
99
* \a crs.
97
100
*
98
- * If \a transform is -1, then any existing source transform for the \a crs will be removed.
101
+ * A datum \a transform of -1 indicates that no datum transform is required for the
102
+ * source CRS.
99
103
*
100
104
* Returns true if the new transform was added successfully.
101
105
*
@@ -104,13 +108,24 @@ class CORE_EXPORT QgsCoordinateTransformContext
104
108
*
105
109
* \see sourceDatumTransforms()
106
110
* \see addDestinationDatumTransform()
111
+ * \see removeSourceDatumTransform()
107
112
*/
108
113
bool addSourceDatumTransform ( const QgsCoordinateReferenceSystem &crs, int transform );
109
114
115
+ /* *
116
+ * Removes the source datum transform for the specified \a crs.
117
+ * \see addSourceDatumTransform()
118
+ * \see removeDestinationDatumTransform()
119
+ */
120
+ void removeSourceDatumTransform ( const QgsCoordinateReferenceSystem &crs );
121
+
110
122
/* *
111
123
* Returns the stored mapping for destination CRS to associated datum transform to use.
112
124
* The map keys will be QgsCoordinateReferenceSystems::authid()s.
113
125
*
126
+ * A datum transform of -1 indicates that no datum transform is required for the
127
+ * destination CRS.
128
+ *
114
129
* \warning This method should not be used to calculate the corresponding datum transforms
115
130
* to use for a coordinate transform. Instead, always use calculateDatumTransforms()
116
131
* to determine this.
@@ -124,7 +139,8 @@ class CORE_EXPORT QgsCoordinateTransformContext
124
139
* Adds a new \a transform to use when projecting coordinates to the specified destination
125
140
* \a crs.
126
141
*
127
- * If \a transform is -1, then any existing destination transform for the \a crs will be removed.
142
+ * A datum \a transform of -1 indicates that no datum transform is required for the
143
+ * destination CRS.
128
144
*
129
145
* Returns true if the new transform was added successfully.
130
146
*
@@ -133,13 +149,24 @@ class CORE_EXPORT QgsCoordinateTransformContext
133
149
*
134
150
* \see destinationDatumTransforms()
135
151
* \see addSourceDatumTransform()
152
+ * \see removeDestinationDatumTransform()
136
153
*/
137
154
bool addDestinationDatumTransform ( const QgsCoordinateReferenceSystem &crs, int transform );
138
155
156
+ /* *
157
+ * Removes the destination datum transform for the specified \a crs.
158
+ * \see addDestinationDatumTransform()
159
+ * \see removeSourceDatumTransform()
160
+ */
161
+ void removeDestinationDatumTransform ( const QgsCoordinateReferenceSystem &crs );
162
+
139
163
/* *
140
164
* Returns the stored mapping for source to destination CRS pairs to associated datum transforms to use.
141
165
* The map keys will be QgsCoordinateReferenceSystems::authid()s.
142
166
*
167
+ * If either the source transform or destination transform is -1, then no datum transform is
168
+ * required for transformations for that source or destination.
169
+ *
143
170
* \warning This method should not be used to calculate the corresponding datum transforms
144
171
* to use for a coordinate transform. Instead, always use calculateDatumTransforms()
145
172
* to determine this.
@@ -152,21 +179,30 @@ class CORE_EXPORT QgsCoordinateTransformContext
152
179
* Adds a new \a sourceTransform and \a destinationTransform to use when projecting coordinates
153
180
* from the the specified \a sourceCrs to the specified \a destinationCrs.
154
181
*
155
- * If either \a sourceTransform or \a destinationTransform is -1, then any existing source to destination
156
- * transform for the crs pair will be removed .
182
+ * If either \a sourceTransform or \a destinationTransform is -1, then no datum transform is
183
+ * required for transformations for that source or destination .
157
184
*
158
185
* Returns true if the new transform pair was added successfully.
159
186
*
160
187
* \note Transforms set using this method will override any specific source or destination
161
188
* transforms set by addSourceDatumTransform() or addDestinationDatumTransform().
162
189
*
163
190
* \see sourceDestinationDatumTransforms()
191
+ * \see removeSourceDestinationDatumTransform()
164
192
*/
165
193
bool addSourceDestinationDatumTransform ( const QgsCoordinateReferenceSystem &sourceCrs,
166
194
const QgsCoordinateReferenceSystem &destinationCrs,
167
195
int sourceTransform,
168
196
int destinationTransform );
169
197
198
+ /* *
199
+ * Removes the source to destination datum transform pair for the specified \a sourceCrs and
200
+ * \a destinationCrs.
201
+ * \see addSourceDestinationDatumTransform()
202
+ */
203
+ void removeSourceDestinationDatumTransform ( const QgsCoordinateReferenceSystem &sourceCrs,
204
+ const QgsCoordinateReferenceSystem &destinationCrs );
205
+
170
206
/* *
171
207
* Returns the pair of source and destination datum transforms to use
172
208
* for a transform from the specified \a source CRS to \a destination CRS.
0 commit comments