16 #ifndef QGSALIGNRASTER_H 17 #define QGSALIGNRASTER_H 23 #include <gdal_version.h> 53 bool isValid()
const {
return nullptr != mDataset; }
74 double identify(
double mx,
double my );
82 double mGeoTransform[6];
119 : inputFilename( input )
120 , outputFilename( output )
121 , resampleMethod( RA_NearestNeighbour )
122 , rescaleValues( false )
123 , srcCellSizeInDestCRS( 0.0 )
148 virtual bool progress(
double complete ) = 0;
180 void setClipExtent(
double xmin,
double ymin,
double xmax,
double ymax );
204 bool checkInputParameters();
208 QSize alignedRasterSize()
const;
225 int suggestedReferenceLayer()
const;
230 bool createAndWarp(
const Item& raster );
257 double mClipExtent[4];
262 double mGeoTransform[6];
269 #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) ...
Median (selects the median of all non-NODATA contributing pixels)
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)
Third quartile (selects the third quartile of all non-NODATA contributing pixels) ...
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)
Maximum (selects the maximum 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.
First quartile (selects the first quartile of all non-NODATA contributing pixels) ...
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)
Minimum (selects the minimum of all non-NODATA contributing pixels)
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.