QGIS/python/core/raster/qgsrasterprojector.sip

88 lines
3.5 KiB
Plaintext
Raw Normal View History

2015-07-29 11:52:14 +02:00
/** Raster projector */
2012-09-13 13:38:39 +02:00
class QgsRasterProjector : QgsRasterInterface
{
%TypeHeaderCode
#include <qgsrasterprojector.h>
#include <qgscoordinatereferencesystem.h>
%End
public:
2016-07-10 14:20:07 +02:00
/** Precision defines if each pixel is reprojected or approximate reprojection based
2016-02-14 03:50:23 +01:00
* on an approximation matrix of reprojected points is used.
*/
enum Precision
{
Approximate, //!< Approximate (default), fast but possibly inaccurate
Exact, //!< Exact, precise but slow
};
/** \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.
*/
2016-02-14 03:50:23 +01:00
QgsRasterProjector( const QgsCoordinateReferenceSystem& theSrcCRS,
const QgsCoordinateReferenceSystem& theDestCRS,
int theSrcDatumTransform,
int theDestDatumTransform,
const QgsRectangle& theDestExtent,
int theDestRows, int theDestCols,
double theMaxSrcXRes, double theMaxSrcYRes,
const QgsRectangle& theExtent
);
2016-02-14 03:50:23 +01:00
QgsRasterProjector( const QgsCoordinateReferenceSystem& theSrcCRS,
const QgsCoordinateReferenceSystem& theDestCRS,
const QgsRectangle& theDestExtent,
int theDestRows, int theDestCols,
double theMaxSrcXRes, double theMaxSrcYRes,
const QgsRectangle& theExtent
);
QgsRasterProjector( const QgsCoordinateReferenceSystem& theSrcCRS,
const QgsCoordinateReferenceSystem& theDestCRS,
double theMaxSrcXRes, double theMaxSrcYRes,
const QgsRectangle& theExtent
);
QgsRasterProjector();
/** \brief The destructor */
~QgsRasterProjector();
virtual QgsRasterProjector *clone() const /Factory/;
int bandCount() const;
int dataType( int bandNo ) const;
/** \brief set source and destination CRS */
2014-01-27 09:22:24 +01:00
void setCRS( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS,
int srcDatumTransform = -1, int destDatumTransform = -1 );
/** \brief Get source CRS */
QgsCoordinateReferenceSystem srcCrs() const;
/** \brief Get destination CRS */
QgsCoordinateReferenceSystem destCrs() const;
/** \brief set maximum source resolution */
void setMaxSrcRes( double theMaxSrcXRes, double theMaxSrcYRes );
Precision precision() const;
void setPrecision( Precision precision );
// Translated precision mode, for use in ComboBox etc.
static QString precisionLabel( Precision precision );
2012-10-11 16:11:45 +02:00
QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height ) / Factory /;
/** Calculate destination extent and size from source extent and size */
bool destExtentSize( const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize,
QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize );
/** Calculate destination extent and size from source extent and size */
static bool extentSize( const QgsCoordinateTransform* ct,
const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize,
QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize );
};