23 #ifndef QGSRASTERPROJECTOR_H
24 #define QGSRASTERPROJECTOR_H
49 int theSrcDatumTransform,
50 int theDestDatumTransform,
52 int theDestRows,
int theDestCols,
53 double theMaxSrcXRes,
double theMaxSrcYRes,
61 int theDestRows,
int theDestCols,
62 double theMaxSrcXRes,
double theMaxSrcYRes,
68 double theMaxSrcXRes,
double theMaxSrcYRes,
90 int srcDatumTransform = -1,
int destDatumTransform = -1 );
101 mMaxSrcXRes = theMaxSrcXRes; mMaxSrcYRes = theMaxSrcYRes;
113 void setSrcRows(
int theRows ) { mSrcRows = theRows; mSrcXRes = mSrcExtent.height() / mSrcRows; }
114 void setSrcCols(
int theCols ) { mSrcCols = theCols; mSrcYRes = mSrcExtent.width() / mSrcCols; }
120 bool srcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
126 void destPointOnCPMatrix(
int theRow,
int theCol,
double *theX,
double *theY );
129 int matrixRow(
int theDestRow );
130 int matrixCol(
int theDestCol );
133 QgsPoint srcPoint(
int theRow,
int theCol );
136 inline bool preciseSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol,
const QgsCoordinateTransform* ct );
139 inline bool approximateSrcRowCol(
int theDestRow,
int theDestCol,
int *theSrcRow,
int *theSrcCol );
160 void calcSrcExtent();
163 void calcSrcRowsCols();
174 void calcHelper(
int theMatrixRow,
QgsPoint *thePoints );
180 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)
int mDestDatumTransform
Destination datum transformation id (or -1 if none)
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.
int mSrcDatumTransform
Source datum transformation id (or -1 if none)
QgsCoordinateReferenceSystem mSrcCRS
Source CRS.