16 #ifndef QGSALIGNRASTER_H 17 #define QGSALIGNRASTER_H 52 bool isValid()
const {
return nullptr != mDataset; }
73 double identify(
double mx,
double my );
81 double mGeoTransform[6];
112 : inputFilename( input )
113 , outputFilename( output )
114 , resampleMethod( RA_NearestNeighbour )
115 , rescaleValues( false )
116 , srcCellSizeInDestCRS( 0.0 )
141 virtual bool progress(
double complete ) = 0;
173 void setClipExtent(
double xmin,
double ymin,
double xmax,
double ymax );
197 bool checkInputParameters();
201 QSize alignedRasterSize()
const;
218 int suggestedReferenceLayer()
const;
223 bool createAndWarp(
const Item& raster );
250 double mClipExtent[4];
255 double mGeoTransform[6];
262 #endif // QGSALIGNRASTER_H List rasters() const
Get list of rasters that will be aligned.
A rectangle specified with double values.
bool rescaleValues
rescaling of values according to the change of pixel size
Nearest neighbour (select on one input pixel)
virtual ~ProgressHandler()
QSize rasterSize() const
Return size of the raster grid in pixels.
List mRasters
List of rasters to be aligned (with their output files and other options)
QString errorMessage() const
Return error from a previous run() call.
Mode (selects the value which appears most often of all the sampled points)
QString outputFilename
filename of the newly created aligned raster (will be overwritten if exists already) ...
Cubic Convolution Approximation (4x4 kernel)
int bandCount() const
Return number of raster bands in the file.
int mBandCnt
number of raster's bands
void setCellSize(QSizeF size)
Set output cell size.
QString crs() const
Return CRS in WKT format.
void setRasters(const List &list)
Set list of rasters that will be aligned.
Definition of one raster layer for alignment.
QgsAlignRaster takes one or more raster layers and warps (resamples) them so they have the same: ...
Helper struct to be sub-classed for progress reporting.
double srcCellSizeInDestCRS
used for rescaling of values (if necessary)
void setGridOffset(QPointF offset)
QString mCrsWkt
CRS stored in WKT format.
ResampleAlg
Resampling algorithm to be used (equivalent to GDAL's enum GDALResampleAlg)
ProgressHandler * progressHandler() const
Get associated progress handler. May be nullptr (default)
Average (computes the average of all non-NODATA contributing pixels)
Item(const QString &input, const QString &output)
void setDestinationCRS(const QString &crsWkt)
Set the output CRS in WKT format.
void setProgressHandler(ProgressHandler *progressHandler)
Assign a progress handler instance. Does not take ownership. nullptr can be passed.
void setCellSize(double x, double y)
Set output cell size.
bool isValid() const
Check whether the given path is a valid raster.
ResampleAlg resampleMethod
resampling method to be used
QString mErrorMessage
Last error message from run()
Cubic B-Spline Approximation (4x4 kernel)
QString inputFilename
filename of the source raster
Lanczos windowed sinc interpolation (6x6 kernel)
QString destinationCRS() const
Get the output CRS in WKT format.
GDALDatasetH mDataset
handle to open GDAL dataset
Utility class for gathering information about rasters.
QString mCrsWkt
Destination CRS - stored in well-known text (WKT) format.
QPointF gridOffset() const
ProgressHandler * mProgressHandler
Object that facilitates reporting of progress / cancellation.
QSizeF cellSize() const
Get output cell size.