@@ -148,9 +148,12 @@ used for rescaling of values (if necessary)
148
148
149
149
struct ProgressHandler
150
150
{
151
+
151
152
virtual bool progress( double complete ) = 0;
152
153
%Docstring
153
- :return: false if the execution should be canceled, true otherwise
154
+ Method to be overridden for progress reporting.
155
+ \param complete Overall progress of the alignment operation
156
+ :return: false if the execution should be canceled, true otherwise
154
157
:rtype: bool
155
158
%End
156
159
@@ -209,44 +212,63 @@ Get the output CRS in WKT format
209
212
210
213
void setClipExtent( double xmin, double ymin, double xmax, double ymax );
211
214
%Docstring
212
- No extra clipping is done if the rectangle is null
215
+ Configure clipping extent (region of interest).
216
+ No extra clipping is done if the rectangle is null
213
217
%End
218
+
214
219
void setClipExtent( const QgsRectangle &extent );
215
220
%Docstring
216
- No extra clipping is done if the rectangle is null
221
+ Configure clipping extent (region of interest).
222
+ No extra clipping is done if the rectangle is null
217
223
%End
224
+
218
225
QgsRectangle clipExtent() const;
219
226
%Docstring
220
- No extra clipping is done if the rectangle is null
227
+ Get clipping extent (region of interest).
228
+ No extra clipping is done if the rectangle is null
221
229
:rtype: QgsRectangle
222
230
%End
223
231
224
232
bool setParametersFromRaster( const RasterInfo &rasterInfo, const QString &customCRSWkt = QString(), QSizeF customCellSize = QSizeF(), QPointF customGridOffset = QPointF( -1, -1 ) );
225
233
%Docstring
226
- :return: true on success (may fail if it is not possible to reproject raster to given CRS)
234
+ Set destination CRS, cell size and grid offset from a raster file.
235
+ The user may provide custom values for some of the parameters - in such case
236
+ only the remaining parameters are calculated.
237
+
238
+ If default CRS is used, the parameters are set according to the raster file's geo-transform.
239
+ If a custom CRS is provided, suggested reprojection is calculated first (using GDAL) in order
240
+ to determine suitable defaults for cell size and grid offset.
241
+
242
+ :return: true on success (may fail if it is not possible to reproject raster to given CRS)
227
243
:rtype: bool
228
244
%End
245
+
229
246
bool setParametersFromRaster( const QString &filename, const QString &customCRSWkt = QString(), QSizeF customCellSize = QSizeF(), QPointF customGridOffset = QPointF( -1, -1 ) );
230
247
%Docstring
231
- See the other variant for details.
248
+ Overridden variant for convenience, taking filename instead RasterInfo object.
249
+ See the other variant for details.
232
250
:rtype: bool
233
251
%End
234
252
235
253
bool checkInputParameters();
236
254
%Docstring
237
- :return: true on success, sets error on error (see errorMessage())
255
+ Determine destination extent from the input rasters and calculate derived values
256
+ :return: true on success, sets error on error (see errorMessage())
238
257
:rtype: bool
239
258
%End
240
259
241
260
QSize alignedRasterSize() const;
242
261
%Docstring
262
+ Return expected size of the resulting aligned raster
243
263
.. note::
244
264
245
265
first need to run checkInputParameters() which returns with success
246
266
:rtype: QSize
247
267
%End
268
+
248
269
QgsRectangle alignedRasterExtent() const;
249
270
%Docstring
271
+ Return expected extent of the resulting aligned raster
250
272
.. note::
251
273
252
274
first need to run checkInputParameters() which returns with success
@@ -255,13 +277,15 @@ See the other variant for details.
255
277
256
278
bool run();
257
279
%Docstring
258
- :return: true on success, sets error on error (see errorMessage())
280
+ Run the alignment process
281
+ :return: true on success, sets error on error (see errorMessage())
259
282
:rtype: bool
260
283
%End
261
284
262
285
QString errorMessage() const;
263
286
%Docstring
264
- Error message is empty if run() succeeded (returned true)
287
+ Return error from a previous run() call.
288
+ Error message is empty if run() succeeded (returned true)
265
289
:rtype: str
266
290
%End
267
291
0 commit comments