23 #ifndef QGSRASTERPROJECTOR_H
24 #define QGSRASTERPROJECTOR_H
49 int theDestRows,
int theDestCols,
50 double theMaxSrcXRes,
double theMaxSrcYRes,
56 double theMaxSrcXRes,
double theMaxSrcYRes,
88 mMaxSrcXRes = theMaxSrcXRes; mMaxSrcYRes = theMaxSrcYRes;
100 void setSrcRows(
int theRows ) { mSrcRows = theRows; mSrcXRes = mSrcExtent.height() / mSrcRows; }
101 void setSrcCols(
int theCols ) { mSrcCols = theCols; mSrcYRes = mSrcExtent.width() / mSrcCols; }
104 void srcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
110 void destPointOnCPMatrix(
int theRow,
int theCol,
double *theX,
double *theY );
113 int matrixRow(
int theDestRow );
114 int matrixCol(
int theDestCol );
117 QgsPoint srcPoint(
int theRow,
int theCol );
120 inline void preciseSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
123 inline void approximateSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
135 void calcCP(
int theRow,
int theCol );
138 bool calcRow(
int theRow );
141 bool calcCol(
int theCol );
144 void calcSrcExtent();
147 void calcSrcRowsCols();
158 void calcHelper(
int theMatrixRow,
QgsPoint *thePoints );
164 QString cpToString();
virtual int bandCount() const =0
Get number of bands.
QgsPoint * pHelperTop
Array of source points for each destination column on top of current CPMatrix grid row...
void setMaxSrcRes(double theMaxSrcXRes, double theMaxSrcYRes)
set maximum source resolution
A rectangle specified with double values.
double mDestRowsPerMatrixRow
number of destination rows per matrix row
void setSrcRows(int theRows)
QgsCoordinateTransform mCoordinateTransform
Reverse coordinate transform (from destination to source)
bool mApproximate
Use approximation.
double mSqrTolerance
Maximum tolerance in destination units.
int mDestRows
Number of destination rows.
int mCPRows
Number of mCPMatrix rows.
QgsCoordinateReferenceSystem mDestCRS
Destination CRS.
int mSrcCols
Number of source columns.
int mHelperTopRow
Current mHelperTop matrix row.
double mSrcYRes
Source y resolution.
QList< QList< QgsPoint > > mCPMatrix
Grid of source control points.
double mSrcXRes
Source x resolution.
double mMaxSrcXRes
Maximum source resolution.
void setSrcCols(int theCols)
QgsPoint * pHelperBottom
Array of source points for each destination column on bottom of current CPMatrix grid row...
int srcRows()
get/set source width/height
double mDestColsPerMatrixCol
number of destination cols per matrix col
QgsCoordinateReferenceSystem destCrs() const
Get destination CRS.
virtual QGis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
double mDestXRes
Destination x resolution.
Base class for processing filters like renderers, reprojector, resampler etc.
A class to represent a point geometry.
int mCPCols
Number of mCPMatrix columns.
QList< QList< bool > > mCPLegalMatrix
Grid of source control points transformation possible indicator.
int mSrcRows
Number of source rows.
QgsCoordinateReferenceSystem srcCrs() const
Get source CRS.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
QgsRectangle mExtent
Source raster extent.
Class for storing a coordinate reference system (CRS)
DataType
Raster data types.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height)=0
Read block of data using given extent and size.
QgsRectangle srcExtent()
get source extent
double mDestYRes
Destination y resolution.
QgsRectangle mSrcExtent
Source extent.
QgsRectangle mDestExtent
Destination extent.
int mDestCols
Number of destination columns.
QgsCoordinateReferenceSystem mSrcCRS
Source CRS.