28#include "moc_qgsrasterprojector.cpp"
30using namespace Qt::StringLiterals;
45 projector->mSrcCRS = mSrcCRS;
46 projector->mDestCRS = mDestCRS;
47 projector->mTransformContext = mTransformContext;
50 projector->mSrcDatumTransform = mSrcDatumTransform;
51 projector->mDestDatumTransform = mDestDatumTransform;
54 projector->mPrecision = mPrecision;
61 return mInput->bandCount();
69 return mInput->dataType( bandNo );
82 mSrcDatumTransform = srcDatumTransform;
83 mDestDatumTransform = destDatumTransform;
91 mTransformContext = transformContext;
93 mSrcDatumTransform = -1;
94 mDestDatumTransform = -1;
99ProjectorData::ProjectorData(
102 : mInverseCt( inverseCt )
103 , mDestExtent( extent )
104 , mDestRows( height )
112 QgsRasterDataProvider *provider =
dynamic_cast<QgsRasterDataProvider *
>(
input->sourceInput() );
125 if ( mExtent.isEmpty() )
127 mExtent = provider->
extent();
132 mDestXRes = mDestExtent.width() / ( mDestCols );
133 mDestYRes = mDestExtent.height() / ( mDestRows );
139 const double myDestRes = mDestXRes < mDestYRes ? mDestXRes : mDestYRes;
140 mSqrTolerance = myDestRes * myDestRes;
148 mApproximate =
false;
153 mCPCols = mCPRows = 3;
161 if ( std::fabs( -mDestExtent.yMinimum() - mDestExtent.yMaximum() ) / height < 0.5 * mDestYRes )
164 for (
int i = 0; i < mCPRows; i++ )
166 QList<QgsPointXY> myRow;
167 myRow.append( QgsPointXY() );
168 myRow.append( QgsPointXY() );
169 myRow.append( QgsPointXY() );
170 mCPMatrix.insert( i, myRow );
172 QList<bool> myLegalRow;
173 myLegalRow.append(
bool(
false ) );
174 myLegalRow.append(
bool(
false ) );
175 myLegalRow.append(
bool(
false ) );
176 mCPLegalMatrix.insert( i, myLegalRow );
178 for (
int i = 0; i < mCPRows; i++ )
180 calcRow( i, inverseCt );
185 const bool myColsOK = checkCols( inverseCt );
188 insertRows( inverseCt );
190 const bool myRowsOK = checkRows( inverseCt );
193 insertCols( inverseCt );
195 if ( myColsOK && myRowsOK )
202 if ( mCPRows * mCPCols > 0.25 * mDestRows * mDestCols )
206 mApproximate =
false;
214 QgsDebugMsgLevel( u
"CPMatrix size: mCPRows = %1 mCPCols = %2"_s.arg( mCPRows ).arg( mCPCols ), 4 );
215 mDestRowsPerMatrixRow =
static_cast< double >( mDestRows ) / ( mCPRows - 1 );
216 mDestColsPerMatrixCol =
static_cast< double >( mDestCols ) / ( mCPCols - 1 );
224 pHelperTop =
new QgsPointXY[mDestCols];
225 pHelperBottom =
new QgsPointXY[mDestCols];
226 calcHelper( 0, pHelperTop );
227 calcHelper( 1, pHelperBottom );
233 mSrcYRes = mSrcExtent.height() / mSrcRows;
234 mSrcXRes = mSrcExtent.width() / mSrcCols;
237ProjectorData::~ProjectorData()
240 delete[] pHelperBottom;
244void ProjectorData::calcSrcExtent()
255 mSrcExtent =
QgsRectangle( myPoint.
x(), myPoint.
y(), myPoint.
x(), myPoint.
y() );
256 for (
int i = 0; i < mCPRows; i++ )
258 for (
int j = 0; j < mCPCols; j++ )
260 myPoint = mCPMatrix[i][j];
261 if ( mCPLegalMatrix[i][j] )
263 mSrcExtent.combineExtentWith( myPoint.
x(), myPoint.
y() );
270 mSrcExtent = mSrcExtent.intersect( mExtent );
281 if ( !mExtent.isEmpty() )
283 if ( mMaxSrcXRes > 0 )
286 double col = std::floor( ( mSrcExtent.xMinimum() - mExtent.xMinimum() ) / mMaxSrcXRes );
287 double x = mExtent.xMinimum() + col * mMaxSrcXRes;
288 mSrcExtent.setXMinimum( x );
290 col = std::ceil( ( mSrcExtent.xMaximum() - mExtent.xMinimum() ) / mMaxSrcXRes );
291 x = mExtent.xMinimum() + col * mMaxSrcXRes;
292 mSrcExtent.setXMaximum( x );
294 if ( mMaxSrcYRes > 0 )
296 double row = std::floor( ( mExtent.yMaximum() - mSrcExtent.yMaximum() ) / mMaxSrcYRes );
297 double y = mExtent.yMaximum() - row * mMaxSrcYRes;
298 mSrcExtent.setYMaximum( y );
300 row = std::ceil( ( mExtent.yMaximum() - mSrcExtent.yMinimum() ) / mMaxSrcYRes );
301 y = mExtent.yMaximum() - row * mMaxSrcYRes;
302 mSrcExtent.setYMinimum( y );
308QString ProjectorData::cpToString()
const
311 for (
int i = 0; i < mCPRows; i++ )
315 for (
int j = 0; j < mCPCols; j++ )
320 if ( mCPLegalMatrix[i][j] )
326 myString +=
"(-,-)"_L1;
333void ProjectorData::calcSrcRowsCols()
341 double myMinSize = std::numeric_limits<double>::max();
345 double myMaxSize = 0;
348 const double myDestColsPerMatrixCell =
static_cast< double >( mDestCols ) / mCPCols;
349 const double myDestRowsPerMatrixCell =
static_cast< double >( mDestRows ) / mCPRows;
350 QgsDebugMsgLevel( u
"myDestColsPerMatrixCell = %1 myDestRowsPerMatrixCell = %2"_s.arg( myDestColsPerMatrixCell ).arg( myDestRowsPerMatrixCell ), 4 );
351 for (
int i = 0; i < mCPRows - 1; i++ )
353 for (
int j = 0; j < mCPCols - 1; j++ )
356 const QgsPointXY myPointB = mCPMatrix[i][j + 1];
357 const QgsPointXY myPointC = mCPMatrix[i + 1][j];
358 if ( mCPLegalMatrix[i][j] && mCPLegalMatrix[i][j + 1] && mCPLegalMatrix[i + 1][j] )
360 double mySize = std::sqrt( myPointA.
sqrDist( myPointB ) ) / myDestColsPerMatrixCell;
361 if ( mySize < myMinSize )
363 if ( mySize > myMaxSize )
366 mySize = std::sqrt( myPointA.
sqrDist( myPointC ) ) / myDestRowsPerMatrixCell;
367 if ( mySize < myMinSize )
369 if ( mySize > myMaxSize )
377 if ( myMinSize < 0.1 * myMaxSize )
378 myMinSize = 0.1 * myMaxSize;
385 int srcXSize, srcYSize;
388 const double srcXRes = srcExtent.
width() / srcXSize;
389 const double srcYRes = srcExtent.
height() / srcYSize;
390 myMinSize = std::min( srcXRes, srcYRes );
403 QgsDebugMsgLevel( u
"mMaxSrcXRes = %1 mMaxSrcYRes = %2"_s.arg( mMaxSrcXRes ).arg( mMaxSrcYRes ), 4 );
405 const double myMinXSize = mMaxSrcXRes > myMinSize ? mMaxSrcXRes : myMinSize;
406 const double myMinYSize = mMaxSrcYRes > myMinSize ? mMaxSrcYRes : myMinSize;
407 QgsDebugMsgLevel( u
"myMinXSize = %1 myMinYSize = %2"_s.arg( myMinXSize ).arg( myMinYSize ), 4 );
408 QgsDebugMsgLevel( u
"mSrcExtent.width = %1 mSrcExtent.height = %2"_s.arg( mSrcExtent.width() ).arg( mSrcExtent.height() ), 4 );
413 double dblSrcRows = mSrcExtent.height() / myMinYSize;
414 if ( dblSrcRows > mDestRows * 10 )
415 mSrcRows = mDestRows * 10;
417 mSrcRows =
static_cast< int >( std::round( dblSrcRows ) );
419 double dblSrcCols = mSrcExtent.width() / myMinXSize;
420 if ( dblSrcCols > mDestCols * 10 )
421 mSrcCols = mDestCols * 10;
423 mSrcCols =
static_cast< int >( std::round( dblSrcCols ) );
425 QgsDebugMsgLevel( u
"mSrcRows = %1 mSrcCols = %2"_s.arg( mSrcRows ).arg( mSrcCols ), 4 );
429inline void ProjectorData::destPointOnCPMatrix(
int row,
int col,
double *theX,
double *theY )
const
431 *theX = mDestExtent.xMinimum() + col * mDestExtent.width() / ( mCPCols - 1 );
432 *theY = mDestExtent.yMaximum() - row * mDestExtent.height() / ( mCPRows - 1 );
435inline int ProjectorData::matrixRow(
int destRow )
const
437 return static_cast< int >( std::floor( ( destRow + 0.5 ) / mDestRowsPerMatrixRow ) );
439inline int ProjectorData::matrixCol(
int destCol )
const
441 return static_cast< int >( std::floor( ( destCol + 0.5 ) / mDestColsPerMatrixCol ) );
444void ProjectorData::calcHelper(
int matrixRow,
QgsPointXY *points )
447 for (
int myDestCol = 0; myDestCol < mDestCols; myDestCol++ )
449 const double myDestX = mDestExtent.xMinimum() + ( myDestCol + 0.5 ) * mDestXRes;
451 const int myMatrixCol = matrixCol( myDestCol );
453 double myDestXMin, myDestYMin, myDestXMax, myDestYMax;
455 destPointOnCPMatrix( matrixRow, myMatrixCol, &myDestXMin, &myDestYMin );
456 destPointOnCPMatrix( matrixRow, myMatrixCol + 1, &myDestXMax, &myDestYMax );
458 const double xfrac = ( myDestX - myDestXMin ) / ( myDestXMax - myDestXMin );
460 const QgsPointXY &mySrcPoint0 = mCPMatrix[matrixRow][myMatrixCol];
461 const QgsPointXY &mySrcPoint1 = mCPMatrix[matrixRow][myMatrixCol + 1];
462 const double s = mySrcPoint0.
x() + ( mySrcPoint1.
x() - mySrcPoint0.
x() ) * xfrac;
463 const double t = mySrcPoint0.
y() + ( mySrcPoint1.
y() - mySrcPoint0.
y() ) * xfrac;
465 points[myDestCol].
setX( s );
466 points[myDestCol].
setY( t );
470void ProjectorData::nextHelper()
475 pHelperTop = pHelperBottom;
477 calcHelper( mHelperTopRow + 2, pHelperBottom );
481bool ProjectorData::srcRowCol(
int destRow,
int destCol,
int *srcRow,
int *srcCol )
485 return approximateSrcRowCol( destRow, destCol, srcRow, srcCol );
489 return preciseSrcRowCol( destRow, destCol, srcRow, srcCol );
493bool ProjectorData::preciseSrcRowCol(
int destRow,
int destCol,
int *srcRow,
int *srcCol )
497 QgsDebugMsgLevel( u
"theDestRow = %1 mDestExtent.yMaximum() = %2 mDestYRes = %3"_s.arg( destRow ).arg( mDestExtent.yMaximum() ).arg( mDestYRes ), 5 );
501 double x = mDestExtent.xMinimum() + ( destCol + 0.5 ) * mDestXRes;
502 double y = mDestExtent.yMaximum() - ( destRow + 0.5 ) * mDestYRes;
509 if ( mInverseCt.isValid() )
513 mInverseCt.transformInPlace( x, y, z );
525 if ( !mExtent.contains( x, y ) )
530 *srcRow =
static_cast< int >( std::floor( ( mSrcExtent.yMaximum() - y ) / mSrcYRes ) );
531 *srcCol =
static_cast< int >( std::floor( ( x - mSrcExtent.xMinimum() ) / mSrcXRes ) );
533 QgsDebugMsgLevel( u
"mSrcExtent.yMinimum() = %1 mSrcExtent.yMaximum() = %2 mSrcYRes = %3"_s.arg( mSrcExtent.yMinimum() ).arg( mSrcExtent.yMaximum() ).arg( mSrcYRes ), 5 );
534 QgsDebugMsgLevel( u
"theSrcRow = %1 srcCol = %2"_s.arg( *srcRow ).arg( *srcCol ), 5 );
541 if ( *srcRow >= mSrcRows )
545 if ( *srcCol >= mSrcCols )
553bool ProjectorData::approximateSrcRowCol(
int destRow,
int destCol,
int *srcRow,
int *srcCol )
555 const int myMatrixRow = matrixRow( destRow );
556 const int myMatrixCol = matrixCol( destCol );
558 if ( myMatrixRow > mHelperTopRow )
564 const double myDestY = mDestExtent.yMaximum() - ( destRow + 0.5 ) * mDestYRes;
568 double myDestXMin, myDestYMin, myDestXMax, myDestYMax;
570 destPointOnCPMatrix( myMatrixRow + 1, myMatrixCol, &myDestXMin, &myDestYMin );
571 destPointOnCPMatrix( myMatrixRow, myMatrixCol + 1, &myDestXMax, &myDestYMax );
573 const double yfrac = ( myDestY - myDestYMin ) / ( myDestYMax - myDestYMin );
575 const QgsPointXY &myTop = pHelperTop[destCol];
576 const QgsPointXY &myBot = pHelperBottom[destCol];
582 const double tx = myTop.
x();
583 const double ty = myTop.
y();
584 const double bx = myBot.
x();
585 const double by = myBot.
y();
586 const double mySrcX = bx + ( tx - bx ) * yfrac;
587 const double mySrcY = by + ( ty - by ) * yfrac;
589 if ( !mExtent.contains( mySrcX, mySrcY ) )
596 *srcRow =
static_cast< int >( std::floor( ( mSrcExtent.yMaximum() - mySrcY ) / mSrcYRes ) );
597 *srcCol =
static_cast< int >( std::floor( ( mySrcX - mSrcExtent.xMinimum() ) / mSrcXRes ) );
602 if ( *srcRow >= mSrcRows )
606 if ( *srcCol >= mSrcCols )
616 for (
int r = 0; r < mCPRows - 1; r++ )
618 QList<QgsPointXY> myRow;
619 QList<bool> myLegalRow;
620 myRow.reserve( mCPCols );
621 myLegalRow.reserve( mCPCols );
622 for (
int c = 0;
c < mCPCols; ++
c )
625 myLegalRow.append(
false );
628 mCPMatrix.insert( 1 + r * 2, myRow );
629 mCPLegalMatrix.insert( 1 + r * 2, myLegalRow );
631 mCPRows += mCPRows - 1;
632 for (
int r = 1; r < mCPRows - 1; r += 2 )
640 for (
int r = 0; r < mCPRows; r++ )
642 for (
int c = 0;
c < mCPCols - 1;
c++ )
645 mCPLegalMatrix[r].insert( 1 +
c * 2,
false );
648 mCPCols += mCPCols - 1;
649 for (
int c = 1;
c < mCPCols - 1;
c += 2 )
657 double myDestX, myDestY;
658 destPointOnCPMatrix( row, col, &myDestX, &myDestY );
659 const QgsPointXY myDestPoint( myDestX, myDestY );
664 mCPMatrix[row][col] = ct.
transform( myDestPoint );
665 mCPLegalMatrix[row][col] =
true;
669 mCPLegalMatrix[row][col] =
false;
676 mCPLegalMatrix[row][col] =
false;
683 for (
int i = 0; i < mCPCols; i++ )
685 calcCP( row, i, ct );
694 for (
int i = 0; i < mCPRows; i++ )
696 calcCP( i, col, ct );
709 for (
int c = 0;
c < mCPCols;
c++ )
711 for (
int r = 1; r < mCPRows - 1; r += 2 )
713 double myDestX, myDestY;
714 destPointOnCPMatrix( r,
c, &myDestX, &myDestY );
715 const QgsPointXY myDestPoint( myDestX, myDestY );
717 const QgsPointXY mySrcPoint1 = mCPMatrix[r - 1][
c];
719 const QgsPointXY mySrcPoint3 = mCPMatrix[r + 1][
c];
721 const QgsPointXY mySrcApprox( ( mySrcPoint1.
x() + mySrcPoint3.
x() ) / 2, ( mySrcPoint1.
y() + mySrcPoint3.
y() ) / 2 );
722 if ( !mCPLegalMatrix[r - 1][
c] || !mCPLegalMatrix[r][
c] || !mCPLegalMatrix[r + 1][
c] )
730 const double mySqrDist = myDestApprox.
sqrDist( myDestPoint );
731 if ( mySqrDist > mSqrTolerance )
754 for (
int r = 0; r < mCPRows; r++ )
756 for (
int c = 1;
c < mCPCols - 1;
c += 2 )
758 double myDestX, myDestY;
759 destPointOnCPMatrix( r,
c, &myDestX, &myDestY );
761 const QgsPointXY myDestPoint( myDestX, myDestY );
762 const QgsPointXY mySrcPoint1 = mCPMatrix[r][
c - 1];
764 const QgsPointXY mySrcPoint3 = mCPMatrix[r][
c + 1];
766 const QgsPointXY mySrcApprox( ( mySrcPoint1.
x() + mySrcPoint3.
x() ) / 2, ( mySrcPoint1.
y() + mySrcPoint3.
y() ) / 2 );
767 if ( !mCPLegalMatrix[r][
c - 1] || !mCPLegalMatrix[r][
c] || !mCPLegalMatrix[r][
c + 1] )
775 const double mySqrDist = myDestApprox.
sqrDist( myDestPoint );
776 if ( mySqrDist > mSqrTolerance )
800 return tr(
"Approximate" );
802 return tr(
"Exact" );
810 QgsDebugMsgLevel( u
"width = %1 height = %2"_s.arg( width ).arg( height ), 4 );
820 if ( !mSrcCRS.isValid() || !mDestCRS.isValid() || mSrcCRS == mDestCRS )
823 return mInput->block( bandNo,
extent, width, height, feedback );
831 ProjectorData pd(
extent, width, height,
mInput, inverseCt, mPrecision, feedback );
836 QgsDebugMsgLevel( u
"srcExtent:\n%1"_s.arg( pd.srcExtent().toString() ), 4 );
837 QgsDebugMsgLevel( u
"srcCols = %1 srcRows = %2"_s.arg( pd.srcCols() ).arg( pd.srcRows() ), 4 );
840 if ( pd.srcRows() <= 0 || pd.srcCols() <= 0 )
846 std::unique_ptr< QgsRasterBlock > inputBlock(
mInput->block( bandNo, pd.srcExtent(), pd.srcCols(), pd.srcRows(), feedback ) );
856 auto outputBlock = std::make_unique< QgsRasterBlock >(
input->dataType(), width, height );
859 if (
input->hasNoDataValue() )
866 return outputBlock.release();
885 for (
int i = 0; i < height; ++i )
889 for (
int j = 0; j < width; ++j )
891 const bool inside = pd.srcRowCol( i, j, &srcRow, &srcCol );
895 const qgssize srcIndex =
static_cast< qgssize >( srcRow ) * pd.srcCols() + srcCol;
898 if ( doNoData &&
input->isNoData( srcRow, srcCol ) )
903 const qgssize destIndex =
static_cast< qgssize >( i ) * width + j;
904 const char *srcBits =
input->constBits( srcIndex );
905 char *destBits = output->
bits( destIndex );
916 memcpy( destBits, srcBits, pixelSize );
921 return outputBlock.release();
926 if ( srcExtent.
isEmpty() || srcXSize <= 0 || srcYSize <= 0 )
936 return extentSize( ct, srcExtent, srcXSize, srcYSize, destExtent, destXSize, destYSize );
941 if ( srcExtent.
isEmpty() || srcXSize <= 0 || srcYSize <= 0 )
953 constexpr int steps = 3;
954 const double srcXStep = srcExtent.
width() / steps;
955 const double srcYStep = srcExtent.
height() / steps;
956 const double srcXRes = srcExtent.
width() / srcXSize;
957 const double srcYRes = srcExtent.
height() / srcYSize;
958 double destXRes = std::numeric_limits<double>::max();
959 double destYRes = std::numeric_limits<double>::max();
963 for (
int i = 0; i < steps; i++ )
965 const double x = srcExtent.
xMinimum() + i * srcXStep;
966 for (
int j = 0; j < steps; j++ )
968 const double y = srcExtent.
yMinimum() + j * srcYStep;
969 const QgsRectangle srcRectangle( x - srcXRes / 2, y - srcYRes / 2, x + srcXRes / 2, y + srcYRes / 2 );
973 if ( destRectangle.
width() > 0 )
975 destXRes = std::min( destXRes, destRectangle.
width() );
976 if ( destRectangle.
width() > maxXRes )
977 maxXRes = destRectangle.
width();
979 if ( destRectangle.
height() > 0 )
981 destYRes = std::min( destYRes, destRectangle.
height() );
982 if ( destRectangle.
height() > maxYRes )
983 maxYRes = destRectangle.
height();
994 if ( destXRes < 0.1 * maxXRes )
996 destXRes = 0.1 * maxXRes;
998 if ( destYRes < 0.1 * maxYRes )
1000 destYRes = 0.1 * maxYRes;
1002 if ( destXRes == 0 || destExtent.
width() / destXRes > std::numeric_limits<int>::max() )
1004 if ( destYRes == 0 || destExtent.
height() / destYRes > std::numeric_limits<int>::max() )
1007 destXSize = std::max( 1,
static_cast< int >( destExtent.
width() / destXRes ) );
1008 destYSize = std::max( 1,
static_cast< int >( destExtent.
height() / destYRes ) );
@ ProviderHintCanPerformProviderResampling
Provider can perform resampling (to be opposed to post rendering resampling).
@ Size
Original data source size (and thus resolution) is known, it is not always available,...
DataType
Raster data types.
@ UnknownDataType
Unknown or unspecified type.
@ Reverse
Reverse/inverse transform (from destination to source).
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Custom exception class for Coordinate Reference System related exceptions.
bool isCanceled() const
Tells whether the operation has been canceled already.
QString toString(int precision=-1) const
Returns a string representation of the point (x, y) with a preset precision.
double sqrDist(double x, double y) const
Returns the squared distance between this point a specified x, y coordinate.
void setY(double y)
Sets the y value of the point.
void setX(double x)
Sets the x value of the point.
Feedback object tailored for raster block reading.
bool isValid() const
Returns true if the block is valid (correctly filled with data).
static bool typeIsNumeric(Qgis::DataType type)
Returns true if a data type is numeric.
char * bits(int row, int column)
Returns a pointer to block data.
static int typeSize(Qgis::DataType dataType)
Returns the size in bytes for the specified dataType.
void setIsData(int row, int column)
Remove no data flag on pixel.
void setNoDataValue(double noDataValue)
Sets cell value that will be considered as "no data".
bool setIsNoData(int row, int column)
Set no data on pixel.
QgsRectangle extent() const override=0
Returns the extent of the layer.
virtual Qgis::RasterProviderCapabilities providerCapabilities() const
Returns flags containing the supported capabilities of the data provider.
Base class for processing filters like renderers, reprojector, resampler etc.
virtual Qgis::RasterInterfaceCapabilities capabilities() const
Returns the capabilities supported by the interface.
virtual int xSize() const
Gets raster size.
QgsRasterInterface(QgsRasterInterface *input=nullptr)
QgsRasterInterface * mInput
virtual int ySize() const
virtual QgsRectangle extent() const
Gets the extent of the interface.
virtual QgsRasterInterface * input() const
Current input.
QgsRasterProjector * clone() const override
Clone itself, create deep copy.
bool destExtentSize(const QgsRectangle &srcExtent, int srcXSize, int srcYSize, QgsRectangle &destExtent, int &destXSize, int &destYSize)
Calculate destination extent and size from source extent and size.
static QString precisionLabel(Precision precision)
Qgis::DataType dataType(int bandNo) const override
Returns data type for the band specified by number.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override
Read block of data using given extent and size.
static bool extentSize(const QgsCoordinateTransform &ct, const QgsRectangle &srcExtent, int srcXSize, int srcYSize, QgsRectangle &destExtent, int &destXSize, int &destYSize)
Calculate destination extent and size from source extent and size.
Precision
Precision defines if each pixel is reprojected or approximate reprojection based on an approximation ...
@ Exact
Exact, precise but slow.
@ Approximate
Approximate (default), fast but possibly inaccurate.
Precision precision() const
int bandCount() const override
Gets number of bands.
Q_DECL_DEPRECATED void setCrs(const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destCRS, int srcDatumTransform=-1, int destDatumTransform=-1)
Sets the source and destination CRS.
A rectangle specified with double values.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
#define Q_NOWARN_DEPRECATED_POP
unsigned long long qgssize
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
#define Q_NOWARN_DEPRECATED_PUSH
#define QgsDebugMsgLevel(str, level)
#define QgsDebugError(str)