16 #ifndef QGSALIGNRASTER_H
17 #define QGSALIGNRASTER_H
52 bool isValid()
const {
return mDataset != 0; }
73 double identify(
double mx,
double my );
81 double mGeoTransform[6];
107 : inputFilename( input )
108 , outputFilename( output )
109 , resampleMethod( RA_NearestNeighbour )
110 , rescaleValues( false )
111 , srcCellSizeInDestCRS( 0.0 )
136 virtual bool progress(
double complete ) = 0;
168 void setClipExtent(
double xmin,
double ymin,
double xmax,
double ymax );
192 bool checkInputParameters();
196 QSize alignedRasterSize()
const;
213 int suggestedReferenceLayer()
const;
218 bool createAndWarp(
const Item& raster );
245 double mClipExtent[4];
250 double mGeoTransform[6];
257 #endif // QGSALIGNRASTER_H
A rectangle specified with double values.
QPointF gridOffset() const
QSizeF cellSize() const
Get output cell size.
bool rescaleValues
rescaling of values according to the change of pixel size
Nearest neighbour (select on one input pixel)
virtual ~ProgressHandler()
List mRasters
List of rasters to be aligned (with their output files and other options)
void setGridOffset(const QPointF &offset)
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 mBandCnt
number of raster's bands
void setRasters(const List &list)
Set list of rasters that will be aligned.
ProgressHandler * progressHandler() const
Get associated progress handler. May be NULL (default)
QSize rasterSize() const
Return size of the raster grid in pixels.
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)
bool isValid() const
Check whether the given path is a valid raster.
QString mCrsWkt
CRS stored in WKT format.
ResampleAlg
Resampling algorithm to be used (equivalent to GDAL's enum GDALResampleAlg)
Average (computes the average of all non-NODATA contributing pixels)
int bandCount() const
Return number of raster bands in the file.
QString errorMessage() const
Return error from a previous run() call.
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. NULL can be passed.
void setCellSize(double x, double y)
Set output cell size.
ResampleAlg resampleMethod
resampling method to be used
QString destinationCRS() const
Get the output CRS in WKT format.
QString mErrorMessage
Last error message from run()
Cubic B-Spline Approximation (4x4 kernel)
QString inputFilename
filename of the source raster
void setCellSize(const QSizeF &size)
Set output cell size.
Lanczos windowed sinc interpolation (6x6 kernel)
QString crs() const
Return CRS in WKT format.
List rasters() const
Get list of rasters that will be aligned.
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.
ProgressHandler * mProgressHandler
Object that facilitates reporting of progress / cancellation.