2012-09-06 19:16:05 +02:00
|
|
|
|
|
|
|
/** Raster projector */
|
|
|
|
|
2012-09-13 13:38:39 +02:00
|
|
|
class QgsRasterProjector : QgsRasterInterface
|
2012-09-06 19:16:05 +02:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsrasterprojector.h>
|
|
|
|
#include <qgscoordinatereferencesystem.h>
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2012-09-06 19:16:05 +02:00
|
|
|
public:
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief QgsRasterProjector implements approximate projection support for
|
|
|
|
* it calculates grid of points in source CRS for target CRS + extent
|
|
|
|
* which are used to calculate affine transformation matrices.
|
|
|
|
*/
|
2012-09-06 19:16:05 +02:00
|
|
|
QgsRasterProjector(
|
|
|
|
QgsCoordinateReferenceSystem theSrcCRS,
|
|
|
|
QgsCoordinateReferenceSystem theDestCRS,
|
|
|
|
QgsRectangle theDestExtent,
|
|
|
|
int theDestRows, int theDestCols,
|
|
|
|
double theMaxSrcXRes, double theMaxSrcYRes,
|
|
|
|
QgsRectangle theExtent
|
|
|
|
);
|
|
|
|
QgsRasterProjector(
|
|
|
|
QgsCoordinateReferenceSystem theSrcCRS,
|
|
|
|
QgsCoordinateReferenceSystem theDestCRS,
|
|
|
|
double theMaxSrcXRes, double theMaxSrcYRes,
|
|
|
|
QgsRectangle theExtent
|
|
|
|
);
|
|
|
|
QgsRasterProjector();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief The destructor */
|
2012-09-06 19:16:05 +02:00
|
|
|
~QgsRasterProjector();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
QgsRasterInterface *clone() const /Factory/;
|
2012-09-06 19:16:05 +02:00
|
|
|
|
|
|
|
int bandCount() const;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
int dataType( int bandNo ) const;
|
2012-09-06 19:16:05 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief set source and destination CRS */
|
2012-09-06 19:16:05 +02:00
|
|
|
void setCRS( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS );
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief Get source CRS */
|
2012-09-06 19:16:05 +02:00
|
|
|
QgsCoordinateReferenceSystem srcCrs() const;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief Get destination CRS */
|
2012-09-06 19:16:05 +02:00
|
|
|
QgsCoordinateReferenceSystem destCrs() const;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief set maximum source resolution */
|
2012-09-06 19:16:05 +02:00
|
|
|
void setMaxSrcRes( double theMaxSrcXRes, double theMaxSrcYRes );
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** get source extent */
|
2012-09-06 19:16:05 +02:00
|
|
|
QgsRectangle srcExtent();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** get/set source width/height */
|
2012-09-06 19:16:05 +02:00
|
|
|
int srcRows();
|
|
|
|
int srcCols();
|
|
|
|
void setSrcRows( int theRows );
|
|
|
|
void setSrcCols( int theCols );
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \brief Get source row and column indexes for current source extent and resolution */
|
2012-09-06 19:16:05 +02:00
|
|
|
void srcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol );
|
|
|
|
|
|
|
|
int dstRows() const;
|
|
|
|
int dstCols() const;
|
|
|
|
|
2012-10-11 16:11:45 +02:00
|
|
|
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height ) / Factory /;
|
2012-09-06 19:16:05 +02:00
|
|
|
};
|
|
|
|
|