37 #define ERR(message) QgsError(message, "Raster provider")
53 QgsDebugMsgLevel( QStringLiteral(
"bandNo = %1 width = %2 height = %3" ).arg( bandNo ).arg( width ).arg( height ), 4 );
56 std::unique_ptr< QgsRasterBlock >
block = std::make_unique< QgsRasterBlock >(
dataType( bandNo ), width, height );
64 QgsDebugMsg( QStringLiteral(
"Couldn't create raster block" ) );
65 block->
setError( { tr(
"Couldn't create raster block." ), QStringLiteral(
"Raster" ) } );
67 return block.release();
75 QgsDebugMsg( QStringLiteral(
"Extent outside provider extent" ) );
76 block->
setError( { tr(
"Extent outside provider extent." ), QStringLiteral(
"Raster" ) } );
79 return block.release();
82 const double xRes = boundingBox.
width() / width;
83 const double yRes = boundingBox.
height() / height;
84 double tmpXRes, tmpYRes;
85 double providerXRes = 0;
86 double providerYRes = 0;
91 tmpXRes = std::max( providerXRes, xRes );
92 tmpYRes = std::max( providerYRes, yRes );
102 if ( tmpExtent != boundingBox ||
103 tmpXRes > xRes || tmpYRes > yRes )
107 if ( !
extent().contains( boundingBox ) )
114 const int fromRow = std::round( ( boundingBox.
yMaximum() - tmpExtent.
yMaximum() ) / yRes );
115 const int toRow = std::round( ( boundingBox.
yMaximum() - tmpExtent.
yMinimum() ) / yRes ) - 1;
116 const int fromCol = std::round( ( tmpExtent.
xMinimum() - boundingBox.
xMinimum() ) / xRes );
117 const int toCol = std::round( ( tmpExtent.
xMaximum() - boundingBox.
xMinimum() ) / xRes ) - 1;
119 QgsDebugMsgLevel( QStringLiteral(
"fromRow = %1 toRow = %2 fromCol = %3 toCol = %4" ).arg( fromRow ).arg( toRow ).arg( fromCol ).arg( toCol ), 4 );
121 if ( fromRow < 0 || fromRow >= height || toRow < 0 || toRow >= height ||
122 fromCol < 0 || fromCol >= width || toCol < 0 || toCol >= width )
125 QgsDebugMsg( QStringLiteral(
"Row or column limits out of range" ) );
126 block->
setError( { tr(
"Row or column limits out of range" ), QStringLiteral(
"Raster" ) } );
128 return block.release();
133 if ( tmpXRes > xRes )
135 int col = std::floor( ( tmpExtent.
xMinimum() -
extent().xMinimum() ) / providerXRes );
137 col = std::ceil( ( tmpExtent.
xMaximum() -
extent().xMinimum() ) / providerXRes );
140 if ( tmpYRes > yRes )
142 int row = std::floor( (
extent().yMaximum() - tmpExtent.
yMaximum() ) / providerYRes );
144 row = std::ceil( (
extent().yMaximum() - tmpExtent.
yMinimum() ) / providerYRes );
147 const int tmpWidth = std::round( tmpExtent.
width() / tmpXRes );
148 const int tmpHeight = std::round( tmpExtent.
height() / tmpYRes );
149 tmpXRes = tmpExtent.
width() / tmpWidth;
150 tmpYRes = tmpExtent.
height() / tmpHeight;
152 QgsDebugMsgLevel( QStringLiteral(
"Reading smaller block tmpWidth = %1 height = %2" ).arg( tmpWidth ).arg( tmpHeight ), 4 );
155 std::unique_ptr< QgsRasterBlock > tmpBlock = std::make_unique< QgsRasterBlock >(
dataType( bandNo ), tmpWidth, tmpHeight );
161 if ( !
readBlock( bandNo, tmpExtent, tmpWidth, tmpHeight, tmpBlock->bits(), feedback ) )
163 QgsDebugMsg( QStringLiteral(
"Error occurred while reading block" ) );
164 block->
setError( { tr(
"Error occurred while reading block." ), QStringLiteral(
"Raster" ) } );
167 return block.release();
172 const double xMin = boundingBox.
xMinimum();
173 const double yMax = boundingBox.
yMaximum();
174 const double tmpXMin = tmpExtent.
xMinimum();
175 const double tmpYMax = tmpExtent.
yMaximum();
177 for (
int row = fromRow; row <= toRow; row++ )
179 const double y = yMax - ( row + 0.5 ) * yRes;
180 const int tmpRow = std::floor( ( tmpYMax - y ) / tmpYRes );
182 for (
int col = fromCol; col <= toCol; col++ )
184 const double x = xMin + ( col + 0.5 ) * xRes;
185 const int tmpCol = std::floor( ( x - tmpXMin ) / tmpXRes );
187 if ( tmpRow < 0 || tmpRow >= tmpHeight || tmpCol < 0 || tmpCol >= tmpWidth )
189 QgsDebugMsg( QStringLiteral(
"Source row or column limits out of range" ) );
191 block->
setError( { tr(
"Source row or column limits out of range." ), QStringLiteral(
"Raster" ) } );
193 return block.release();
196 const qgssize tmpIndex =
static_cast< qgssize >( tmpRow ) *
static_cast< qgssize >( tmpWidth ) + tmpCol;
197 const qgssize index = row *
static_cast< qgssize >( width ) + col;
199 char *tmpBits = tmpBlock->
bits( tmpIndex );
203 QgsDebugMsg( QStringLiteral(
"Cannot get input block data tmpRow = %1 tmpCol = %2 tmpIndex = %3." ).arg( tmpRow ).arg( tmpCol ).arg( tmpIndex ) );
208 QgsDebugMsg( QStringLiteral(
"Cannot set output block data." ) );
211 memcpy( bits, tmpBits, pixelSize );
219 QgsDebugMsg( QStringLiteral(
"Error occurred while reading block" ) );
221 block->
setError( { tr(
"Error occurred while reading block." ), QStringLiteral(
"Raster" ) } );
223 return block.release();
231 return block.release();
243 QgsDataProvider::ReadFlags flags )
272 QMap<int, QVariant> results;
276 QgsDebugMsg( QStringLiteral(
"Format not supported" ) );
280 if ( !
extent().contains( point ) )
283 for (
int bandNo = 1; bandNo <=
bandCount(); bandNo++ )
285 results.insert( bandNo, QVariant() );
304 const double xres = ( finalExtent.
width() ) / width;
305 const double yres = ( finalExtent.
height() ) / height;
307 const int col =
static_cast< int >( std::floor( ( point.
x() - finalExtent.
xMinimum() ) / xres ) );
308 const int row =
static_cast< int >( std::floor( ( finalExtent.
yMaximum() - point.
y() ) / yres ) );
310 const double xMin = finalExtent.
xMinimum() + col * xres;
311 const double xMax = xMin + xres;
312 const double yMax = finalExtent.
yMaximum() - row * yres;
313 const double yMin = yMax - yres;
314 const QgsRectangle pixelExtent( xMin, yMin, xMax, yMax );
318 std::unique_ptr< QgsRasterBlock > bandBlock(
block( i, pixelExtent, 1, 1 ) );
322 const double value = bandBlock->value( 0 );
324 results.insert( i, value );
328 results.insert( i, QVariant() );
335 bool *ok,
const QgsRectangle &boundingBox,
int width,
int height,
int dpi )
341 const QVariant value = res.results().value( band );
343 if ( !value.isValid() )
344 return std::numeric_limits<double>::quiet_NaN();
349 return value.toDouble( ok );
354 return QStringLiteral(
"text/plain" );
363 QgsDebugMsg( QStringLiteral(
"writeBlock() called on read-only provider." ) );
373 if ( methods.isEmpty() )
375 QgsDebugMsg( QStringLiteral(
"provider pyramidResamplingMethods returned no methods" ) );
383 return std::any_of( pyramidList.constBegin(), pyramidList.constEnd(), [](
QgsRasterPyramid pyramid ) { return pyramid.getExists(); } );
395 QgsDebugMsgLevel( QStringLiteral(
"set %1 band %1 no data ranges" ).arg( noData.size() ), 4 );
402 return stats.bandNumber == bandNo;
406 return histogram.bandNumber == bandNo;
414 return mTemporalCapabilities.get();
419 return mTemporalCapabilities.get();
424 const QString &format,
int nBands,
426 int width,
int height,
double *geoTransform,
428 const QStringList &createOptions )
434 height, geoTransform,
crs, createOptions );
437 QgsDebugMsg(
"Cannot resolve 'createRasterDataProviderFunction' function in " + providerKey +
" provider" );
451 return QStringLiteral(
"Value" );
453 return QStringLiteral(
"Text" );
455 return QStringLiteral(
"Html" );
457 return QStringLiteral(
"Feature" );
459 return QStringLiteral(
"Undefined" );
468 return tr(
"Value" );
474 return tr(
"Feature" );
476 return QStringLiteral(
"Undefined" );
508 return QList< double >();
543 if ( mTemporalCapabilities && other.mTemporalCapabilities )
545 *mTemporalCapabilities = *other.mTemporalCapabilities;
551 if (
str == QLatin1String(
"bilinear" ) )
555 else if (
str == QLatin1String(
"cubic" ) )
559 else if (
str == QLatin1String(
"cubicSpline" ) )
563 else if (
str == QLatin1String(
"lanczos" ) )
567 else if (
str == QLatin1String(
"average" ) )
571 else if (
str == QLatin1String(
"mode" ) )
575 else if (
str == QLatin1String(
"gauss" ) )
584 if ( filterElem.isNull() )
589 const QDomElement resamplingElement = filterElem.firstChildElement( QStringLiteral(
"resampling" ) );
590 if ( !resamplingElement.isNull() )
592 setMaxOversampling( resamplingElement.attribute( QStringLiteral(
"maxOversampling" ), QStringLiteral(
"2.0" ) ).toDouble() );
593 setZoomedInResamplingMethod( resamplingMethodFromString( resamplingElement.attribute( QStringLiteral(
"zoomedInResamplingMethod" ) ) ) );
594 setZoomedOutResamplingMethod( resamplingMethodFromString( resamplingElement.attribute( QStringLiteral(
"zoomedOutResamplingMethod" ) ) ) );
604 return QStringLiteral(
"nearestNeighbour" );
606 return QStringLiteral(
"bilinear" );
608 return QStringLiteral(
"cubic" );
610 return QStringLiteral(
"cubicSpline" );
612 return QStringLiteral(
"lanczos" );
614 return QStringLiteral(
"average" );
616 return QStringLiteral(
"mode" );
618 return QStringLiteral(
"gauss" );
621 return QStringLiteral(
"nearestNeighbour" );
626 QDomElement providerElement = doc.createElement( QStringLiteral(
"provider" ) );
627 parentElem.appendChild( providerElement );
629 QDomElement resamplingElement = doc.createElement( QStringLiteral(
"resampling" ) );
630 providerElement.appendChild( resamplingElement );
632 resamplingElement.setAttribute( QStringLiteral(
"enabled" ),
635 resamplingElement.setAttribute( QStringLiteral(
"zoomedInResamplingMethod" ),
638 resamplingElement.setAttribute( QStringLiteral(
"zoomedOutResamplingMethod" ),
641 resamplingElement.setAttribute( QStringLiteral(
"maxOversampling" ),
652 QUrl url = QUrl::fromPercentEncoding(
uri.toUtf8() );
653 const QUrlQuery query( url.query() );
656 if ( ! query.hasQueryItem( QStringLiteral(
"crs" ) ) )
659 if ( ok ) *ok =
false;
662 if ( ! components.
crs.
createFromString( query.queryItemValue( QStringLiteral(
"crs" ) ) ) )
665 if ( ok ) *ok =
false;
670 if ( ! query.hasQueryItem( QStringLiteral(
"extent" ) ) )
673 if ( ok ) *ok =
false;
676 QStringList pointValuesList = query.queryItemValue( QStringLiteral(
"extent" ) ).split(
',' );
677 if ( pointValuesList.size() != 4 )
680 if ( ok ) *ok =
false;
683 components.
extent =
QgsRectangle( pointValuesList.at( 0 ).toDouble(), pointValuesList.at( 1 ).toDouble(),
684 pointValuesList.at( 2 ).toDouble(), pointValuesList.at( 3 ).toDouble() );
686 if ( ! query.hasQueryItem( QStringLiteral(
"width" ) ) )
689 if ( ok ) *ok =
false;
693 components.
width = query.queryItemValue( QStringLiteral(
"width" ) ).toInt( & flagW );
694 if ( !flagW || components.
width < 0 )
697 if ( ok ) *ok =
false;
701 if ( ! query.hasQueryItem( QStringLiteral(
"height" ) ) )
704 if ( ok ) *ok =
false;
708 components.
height = query.queryItemValue( QStringLiteral(
"height" ) ).toInt( & flagH );
709 if ( !flagH || components.
height < 0 )
712 if ( ok ) *ok =
false;
716 if ( ! query.hasQueryItem( QStringLiteral(
"formula" ) ) )
719 if ( ok ) *ok =
false;
722 components.
formula = query.queryItemValue( QStringLiteral(
"formula" ) );
724 for (
const auto &item : query.queryItems() )
726 if ( !( item.first.mid( item.first.indexOf(
':' ), -1 ) == QLatin1String(
":uri" ) ) )
732 rLayer.
name = item.first.mid( 0, item.first.indexOf(
':' ) );
733 rLayer.
uri = query.queryItemValue( item.first );
734 rLayer.
provider = query.queryItemValue( item.first.mid( 0, item.first.indexOf(
':' ) ) + QStringLiteral(
":provider" ) );
736 if ( rLayer.
uri.isNull() || rLayer.
provider.isNull() )
738 QgsDebugMsg(
"One or more raster information are missing" );
739 if ( ok ) *ok =
false;
747 if ( ok ) *ok =
true;
758 query.addQueryItem( QStringLiteral(
"crs" ), parts.
crs.
authid() );
766 query.addQueryItem( QStringLiteral(
"extent" ), rect );
769 query.addQueryItem( QStringLiteral(
"width" ), QString::number( parts.
width ) );
771 query.addQueryItem( QStringLiteral(
"height" ), QString::number( parts.
height ) );
773 query.addQueryItem( QStringLiteral(
"formula" ), parts.
formula );
779 query.addQueryItem( it.name + QStringLiteral(
":uri" ), it.uri );
780 query.addQueryItem( it.name + QStringLiteral(
":provider" ), it.provider );
783 uri.setQuery( query );
784 return QString( QUrl::toPercentEncoding(
uri.toEncoded() ) );
DataType
Raster data types.
This class represents a coordinate reference system (CRS).
bool isValid() const
Returns whether this CRS is correctly initialized and usable.
bool createFromString(const QString &definition)
Set up this CRS from a string definition.
QString authid() const
Returns the authority identifier for the CRS.
Abstract base class for spatial data provider implementations.
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate system for the data source.
QgsDataSourceUri uri() const
Gets the data source specification.
A class to represent a 2D point.
Point geometry type, with support for z-dimension and m-values.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
QgsRasterDataProvider * createRasterDataProvider(const QString &providerKey, const QString &uri, const QString &format, int nBands, Qgis::DataType type, int width, int height, double *geoTransform, const QgsCoordinateReferenceSystem &crs, const QStringList &createOptions=QStringList())
Creates new instance of raster data provider.
QList< QPair< QString, QString > > pyramidResamplingMethods(const QString &providerKey)
Returns list of raster pyramid resampling methods.
The RasterBandStats struct is a container for statistics about a single raster band.
Feedback object tailored for raster block reading.
bool isEmpty() const
Returns true if block is empty, i.e.
void setNoDataValue(double noDataValue) SIP_HOLDGIL
Sets cell value that will be considered as "no data".
void setValid(bool valid) SIP_HOLDGIL
Mark block as valid or invalid.
int width() const SIP_HOLDGIL
Returns the width (number of columns) of the raster block.
char * bits(int row, int column)
Returns a pointer to block data.
bool setIsNoDataExcept(QRect exceptRect)
Set the whole block to no data except specified rectangle.
void applyNoDataValues(const QgsRasterRangeList &rangeList)
void applyScaleOffset(double scale, double offset)
Apply band scale and offset to raster block values.
static QRect subRect(const QgsRectangle &extent, int width, int height, const QgsRectangle &subExtent)
For extent and width, height find rectangle covered by subextent.
void setError(const QgsError &error)
Sets the last error.
int height() const SIP_HOLDGIL
Returns the height (number of rows) of the raster block.
bool setIsNoData(int row, int column) SIP_HOLDGIL
Set no data on pixel.
Implementation of data provider temporal properties for QgsRasterDataProviders.
Base class for raster data providers.
double mMaxOversampling
Maximum boundary for oversampling (to avoid too much data traffic). Default: 2.0.
QList< bool > mUseSrcNoDataValue
Use source nodata value.
TransformType
Types of transformation in transformCoordinates() function.
static QgsRaster::IdentifyFormat identifyFormatFromName(const QString &formatName)
virtual bool sourceHasNoDataValue(int bandNo) const
Returns true if source band has no data value.
static QString encodeVirtualRasterProviderUri(const VirtualRasterParameters &parts)
Encodes the URI starting from the struct .
virtual double bandOffset(int bandNo) const
Read band offset for raster value.
virtual QString lastErrorFormat()
Returns the format of the error text for the last error in this provider.
bool mProviderResamplingEnabled
Whether provider resampling is enabled.
virtual bool useSourceNoDataValue(int bandNo) const
Returns the source nodata value usage.
virtual QList< QgsRasterPyramid > buildPyramidList(const QList< int > &overviewList=QList< int >())
Returns the raster layers pyramid list.
static QgsRasterDataProvider::VirtualRasterParameters decodeVirtualRasterProviderUri(const QString &uri, bool *ok=nullptr)
Decodes the URI returning a struct with all the parameters for QgsVirtualRasterProvider class.
virtual void setUseSourceNoDataValue(int bandNo, bool use)
Sets the source nodata value usage.
virtual double sourceNoDataValue(int bandNo) const
Value representing no data value.
QString colorName(int colorInterpretation) const
void readXml(const QDomElement &filterElem) override
Sets base class members from xml. Usually called from create() methods of subclasses.
QList< QgsRasterRangeList > mUserNoDataValue
List of lists of user defined additional no data values for each band, indexed from 0.
virtual QgsRasterIdentifyResult identify(const QgsPointXY &point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox=QgsRectangle(), int width=0, int height=0, int dpi=96)
Identify raster value(s) found on the point position.
virtual QgsRasterDataProvider::ProviderCapabilities providerCapabilities() const
Returns flags containing the supported capabilities of the data provider.
virtual bool isEditable() const
Checks whether the provider is in editing mode, i.e.
void copyBaseSettings(const QgsRasterDataProvider &other)
Copy member variables from other raster data provider. Useful for implementation of clone() method in...
bool userNoDataValuesContains(int bandNo, double value) const
Returns true if user no data contains value.
bool writeBlock(QgsRasterBlock *block, int band, int xOffset=0, int yOffset=0)
Writes pixel data from a raster block into the provider data source.
virtual bool enableProviderResampling(bool enable)
Enable or disable provider-level resampling.
QgsRectangle extent() const override=0
Returns the extent of the layer.
virtual bool ignoreExtents() const
Returns true if the extents reported by the data provider are not reliable and it's possible that the...
virtual bool setMaxOversampling(double factor)
Sets maximum oversampling factor for zoomed-out operations.
Qgis::DataType dataType(int bandNo) const override=0
Returns data type for the band specified by number.
ResamplingMethod mZoomedOutResamplingMethod
Resampling method for zoomed out pixel extraction.
static Capability identifyFormatToCapability(QgsRaster::IdentifyFormat format)
bool hasPyramids()
Returns true if raster has at least one existing pyramid.
virtual double bandScale(int bandNo) const
Read band scale for raster value.
static QString identifyFormatName(QgsRaster::IdentifyFormat format)
@ NoProviderCapabilities
Provider has no capabilities.
int dpi() const
Returns the dpi of the output device.
virtual double sample(const QgsPointXY &point, int band, bool *ok=nullptr, const QgsRectangle &boundingBox=QgsRectangle(), int width=0, int height=0, int dpi=96)
Samples a raster value from the specified band found at the point position.
static QString identifyFormatLabel(QgsRaster::IdentifyFormat format)
QgsRasterBlock * block(int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback *feedback=nullptr) override
Read block of data using given extent and size.
virtual int colorInterpretation(int bandNo) const
Returns data type for the band specified by number.
QList< double > mSrcNoDataValue
Source no data value is available and is set to be used or internal no data is available.
virtual bool readBlock(int bandNo, int xBlock, int yBlock, void *data)
Reads a block of raster data into data.
ResamplingMethod mZoomedInResamplingMethod
Resampling method for zoomed in pixel extraction.
QgsRasterDataProvider()
Provider capabilities.
QList< bool > mSrcHasNoDataValue
Source no data value exists.
static QgsRasterDataProvider * create(const QString &providerKey, const QString &uri, const QString &format, int nBands, Qgis::DataType type, int width, int height, double *geoTransform, const QgsCoordinateReferenceSystem &crs, const QStringList &createOptions=QStringList())
Creates a new dataset with mDataSourceURI.
virtual QgsRasterRangeList userNoDataValues(int bandNo) const
Returns a list of user no data value ranges.
virtual bool setZoomedInResamplingMethod(ResamplingMethod method)
Set resampling method to apply for zoomed-in operations.
static QList< QPair< QString, QString > > pyramidResamplingMethods(const QString &providerKey)
Returns a list of pyramid resampling method name and label pairs for given provider.
void writeXml(QDomDocument &doc, QDomElement &parentElem) const override
Write base class members to xml.
virtual QList< double > nativeResolutions() const
Returns a list of native resolutions if available, i.e.
virtual QgsPoint transformCoordinates(const QgsPoint &point, TransformType type)
Transforms coordinates between source image coordinate space [0..width]x[0..height] and layer coordin...
QgsRasterDataProviderTemporalCapabilities * temporalCapabilities() override
Returns the provider's temporal capabilities.
QString colorInterpretationName(int bandNo) const override
Returns the name of the color interpretation for the specified bandNumber.
ResamplingMethod
Resampling method for provider-level resampling.
@ Lanczos
Lanczos windowed sinc interpolation (6x6 kernel)
@ Nearest
Nearest-neighbour resampling.
@ Mode
Mode (selects the value which appears most often of all the sampled points)
@ Bilinear
Bilinear (2x2 kernel) resampling.
@ Average
Average resampling.
@ CubicSpline
Cubic B-Spline Approximation (4x4 kernel)
@ Cubic
Cubic Convolution Approximation (4x4 kernel) resampling.
virtual bool write(void *data, int band, int width, int height, int xOffset, int yOffset)
Writes into the provider datasource.
virtual void setUserNoDataValue(int bandNo, const QgsRasterRangeList &noData)
virtual bool setZoomedOutResamplingMethod(ResamplingMethod method)
Set resampling method to apply for zoomed-out operations.
The QgsRasterHistogram is a container for histogram of a single raster band.
Raster identify results container.
Base class for processing filters like renderers, reprojector, resampler etc.
QList< QgsRasterBandStats > mStatistics
List of cached statistics, all bands mixed.
Capability
If you add to this, please also add to capabilitiesString()
@ IdentifyValue
Numerical values.
@ IdentifyFeature
WMS GML -> feature.
@ Size
Original data source size (and thus resolution) is known, it is not always available,...
virtual int xSize() const
Gets raster size.
virtual int bandCount() const =0
Gets number of bands.
int dataTypeSize(int bandNo) const
Returns the size (in bytes) for the data type for the specified band.
virtual int capabilities() const
Returns a bitmask containing the supported capabilities.
virtual int ySize() const
QList< QgsRasterHistogram > mHistograms
List of cached histograms, all bands mixed.
virtual QgsRasterHistogram histogram(int bandNo, int binCount=0, double minimum=std::numeric_limits< double >::quiet_NaN(), double maximum=std::numeric_limits< double >::quiet_NaN(), const QgsRectangle &extent=QgsRectangle(), int sampleSize=0, bool includeOutOfRange=false, QgsRasterBlockFeedback *feedback=nullptr)
Returns a band histogram.
This struct is used to store pyramid info for the raster layer.
bool contains(double value) const
Returns true if this range contains the specified value.
@ IdentifyFormatUndefined
@ UndefinedColorInterpretation
A rectangle specified with double values.
QString toString(int precision=16) const
Returns a string representation of form xmin,ymin : xmax,ymax Coordinates will be truncated to the sp...
double yMaximum() const SIP_HOLDGIL
Returns the y maximum value (top side of rectangle).
double xMaximum() const SIP_HOLDGIL
Returns the x maximum value (right side of rectangle).
double xMinimum() const SIP_HOLDGIL
Returns the x minimum value (left side of rectangle).
double yMinimum() const SIP_HOLDGIL
Returns the y minimum value (bottom side of rectangle).
void setYMinimum(double y) SIP_HOLDGIL
Set the minimum y value.
bool isNull() const
Test if the rectangle is null (all coordinates zero or after call to setMinimal()).
void setXMaximum(double x) SIP_HOLDGIL
Set the maximum x value.
void setXMinimum(double x) SIP_HOLDGIL
Set the minimum x value.
double height() const SIP_HOLDGIL
Returns the height of the rectangle.
void setYMaximum(double y) SIP_HOLDGIL
Set the maximum y value.
double width() const SIP_HOLDGIL
Returns the width of the rectangle.
bool isEmpty() const
Returns true if the rectangle is empty.
QString qgsDoubleToString(double a, int precision=17)
Returns a string representation of a double.
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...
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
#define QgsDebugMsgLevel(str, level)
QList< QgsRasterRange > QgsRasterRangeList
const QgsCoordinateReferenceSystem & crs
Setting options for creating vector data providers.
Struct that stores the information about the parameters that should be given to the QgsVirtualRasterP...
QList< QgsRasterDataProvider::VirtualRasterInputLayers > rInputLayers
QgsCoordinateReferenceSystem crs