QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
53 #include "qgsgdalprovider.h"
64 #include <QApplication>
67 #include <QDomElement>
72 #include <QFontMetrics>
78 #include <QMessageBox>
84 #define ERR(message) QGS_ERROR_MESSAGE(message,"Raster layer")
104 , QSTRING_NOT_SET( QStringLiteral(
"Not Set" ) )
105 , TRSTRING_NOT_SET( tr(
"Not Set" ) )
114 const QString &baseName,
115 const QString &providerKey,
119 , QSTRING_NOT_SET( QStringLiteral(
"Not Set" ) )
120 , TRSTRING_NOT_SET( tr(
"Not Set" ) )
158 for (
int i = 1; i < mPipe.
size(); i++ )
175 bool myIsValid = QgsGdalProvider::isValidRasterFileName( fileNameQString, retErrMsg );
190 QFileInfo fi(
name );
196 t = fi.lastModified();
219 if ( !mDataProvider )
return 0;
225 if ( !mDataProvider )
return QString();
236 return mDataProvider;
241 return mDataProvider;
273 bool restoreOldResamplingStage =
false;
281 if ( mDataProvider !=
nullptr &&
286 restoreOldResamplingStage =
true;
295 drawer.
draw( theQPainter, rasterViewPort, qgsMapToPixel );
297 if ( restoreOldResamplingStage )
302 QgsDebugMsgLevel( QStringLiteral(
"total raster draw time (ms): %1" ).arg( time.elapsed(), 5 ), 4 );
307 QList< QPair< QString, QColor > > symbolList;
319 QString myMetadata = QStringLiteral(
"<html><head></head>\n<body>\n" );
322 myMetadata += QStringLiteral(
"<h1>" ) + tr(
"Information from provider" ) + QStringLiteral(
"</h1>\n<hr>\n" ) %
323 QStringLiteral(
"<table class=\"list-view\">\n" ) %
326 QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Name" ) % QStringLiteral(
"</td><td>" ) %
name() % QStringLiteral(
"</td></tr>\n" );
331 if ( uriComponents.contains( QStringLiteral(
"path" ) ) )
333 path = uriComponents[QStringLiteral(
"path" )].toString();
334 if ( QFile::exists( path ) )
335 myMetadata += QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Path" ) % QStringLiteral(
"</td><td>%1" ).arg( QStringLiteral(
"<a href=\"%1\">%2</a>" ).arg( QUrl::fromLocalFile( path ).toString(), QDir::toNativeSeparators( path ) ) ) + QStringLiteral(
"</td></tr>\n" );
337 if ( uriComponents.contains( QStringLiteral(
"url" ) ) )
339 const QString url = uriComponents[QStringLiteral(
"url" )].toString();
340 myMetadata += QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"URL" ) % QStringLiteral(
"</td><td>%1" ).arg( QStringLiteral(
"<a href=\"%1\">%2</a>" ).arg( QUrl( url ).toString(), url ) ) + QStringLiteral(
"</td></tr>\n" );
345 myMetadata += QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Source" ) + QStringLiteral(
"</td><td>%1" ).arg(
publicSource() ) + QStringLiteral(
"</td></tr>\n" );
348 myMetadata += QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"CRS" ) + QStringLiteral(
"</td><td>" );
352 if (
crs().isGeographic() )
353 myMetadata += tr(
"Geographic" );
355 myMetadata += tr(
"Projected" );
357 myMetadata += QStringLiteral(
"</td></tr>\n" ) %
360 QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Extent" ) % QStringLiteral(
"</td><td>" ) %
extent().
toString() % QStringLiteral(
"</td></tr>\n" ) %
363 QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Unit" ) % QStringLiteral(
"</td><td>" ) %
QgsUnitTypes::toString(
crs().mapUnits() ) % QStringLiteral(
"</td></tr>\n" ) %
366 QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Width" ) % QStringLiteral(
"</td><td>" );
368 myMetadata += QString::number(
width() );
370 myMetadata += tr(
"n/a" );
371 myMetadata += QStringLiteral(
"</td></tr>\n" ) %
374 QStringLiteral(
"<tr><td class=\"highlight\">" ) + tr(
"Height" ) + QStringLiteral(
"</td><td>" );
376 myMetadata += QString::number(
height() );
378 myMetadata += tr(
"n/a" );
379 myMetadata += QStringLiteral(
"</td></tr>\n" ) %
382 QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Data type" ) % QStringLiteral(
"</td><td>" );
387 myMetadata += tr(
"Byte - Eight bit unsigned integer" );
390 myMetadata += tr(
"UInt16 - Sixteen bit unsigned integer " );
393 myMetadata += tr(
"Int16 - Sixteen bit signed integer " );
396 myMetadata += tr(
"UInt32 - Thirty two bit unsigned integer " );
399 myMetadata += tr(
"Int32 - Thirty two bit signed integer " );
402 myMetadata += tr(
"Float32 - Thirty two bit floating point " );
405 myMetadata += tr(
"Float64 - Sixty four bit floating point " );
408 myMetadata += tr(
"CInt16 - Complex Int16 " );
411 myMetadata += tr(
"CInt32 - Complex Int32 " );
414 myMetadata += tr(
"CFloat32 - Complex Float32 " );
417 myMetadata += tr(
"CFloat64 - Complex Float64 " );
420 myMetadata += tr(
"Could not determine raster data type." );
422 myMetadata += QStringLiteral(
"</td></tr>\n" ) %
428 QStringLiteral(
"</table>\n<br><br>" ) %
431 QStringLiteral(
"<h1>" ) % tr(
"Identification" ) % QStringLiteral(
"</h1>\n<hr>\n" ) %
433 QStringLiteral(
"<br><br>\n" ) %
436 QStringLiteral(
"<h1>" ) % tr(
"Extent" ) % QStringLiteral(
"</h1>\n<hr>\n" ) %
438 QStringLiteral(
"<br><br>\n" ) %
441 QStringLiteral(
"<h1>" ) % tr(
"Access" ) % QStringLiteral(
"</h1>\n<hr>\n" ) %
443 QStringLiteral(
"<br><br>\n" ) %
446 QStringLiteral(
"</table>\n<br><br><h1>" ) % tr(
"Bands" ) % QStringLiteral(
"</h1>\n<hr>\n<table class=\"list-view\">\n" ) %
449 QStringLiteral(
"<tr><td class=\"highlight\">" ) % tr(
"Band count" ) % QStringLiteral(
"</td><td>" ) % QString::number(
bandCount() ) % QStringLiteral(
"</td></tr>\n" );
452 myMetadata += QStringLiteral(
"</table>\n<br><table width=\"100%\" class=\"tabular-view\">\n" ) %
453 QStringLiteral(
"<tr><th>" ) % tr(
"Number" ) % QStringLiteral(
"</th><th>" ) % tr(
"Band" ) % QStringLiteral(
"</th><th>" ) % tr(
"No-Data" ) % QStringLiteral(
"</th><th>" ) %
454 tr(
"Min" ) % QStringLiteral(
"</th><th>" ) % tr(
"Max" ) % QStringLiteral(
"</th></tr>\n" );
461 rowClass = QStringLiteral(
"class=\"odd-row\"" );
463 myMetadata += QStringLiteral(
"<tr " ) % rowClass % QStringLiteral(
"><td>" ) % QString::number( i ) % QStringLiteral(
"</td><td>" ) %
bandName( i ) % QStringLiteral(
"</td><td>" );
466 myMetadata += QString::number(
dataProvider()->sourceNoDataValue( i ) );
468 myMetadata += tr(
"n/a" );
469 myMetadata += QLatin1String(
"</td>" );
474 myMetadata += QStringLiteral(
"<td>" ) % QString::number( myRasterBandStats.
minimumValue,
'f', 10 ) % QStringLiteral(
"</td>" ) %
475 QStringLiteral(
"<td>" ) % QString::number( myRasterBandStats.
maximumValue,
'f', 10 ) % QStringLiteral(
"</td>" );
479 myMetadata += QStringLiteral(
"<td>" ) % tr(
"n/a" ) % QStringLiteral(
"</td><td>" ) % tr(
"n/a" ) % QStringLiteral(
"</td>" );
482 myMetadata += QLatin1String(
"</tr>\n" );
486 myMetadata += QStringLiteral(
"</table>\n<br><br>" ) %
489 QStringLiteral(
"<h1>" ) % tr(
"Contacts" ) % QStringLiteral(
"</h1>\n<hr>\n" ) %
491 QStringLiteral(
"<br><br>\n" ) %
494 QStringLiteral(
"<h1>" ) % tr(
"References" ) % QStringLiteral(
"</h1>\n<hr>\n" ) %
496 QStringLiteral(
"<br><br>\n" ) %
499 QStringLiteral(
"<h1>" ) % tr(
"History" ) % QStringLiteral(
"</h1>\n<hr>\n" ) %
501 QStringLiteral(
"<br><br>\n" ) %
503 QStringLiteral(
"\n</body>\n</html>\n" );
514 if ( mDataProvider &&
519 QList<QgsColorRampShader::ColorRampItem> myColorRampItemList = mDataProvider->
colorTable( bandNumber );
520 if ( !myColorRampItemList.isEmpty() )
527 QPixmap myPalettePixmap( mySize, mySize );
528 QPainter myQPainter( &myPalettePixmap );
530 QImage myQImage = QImage( mySize, mySize, QImage::Format_RGB32 );
532 myPalettePixmap.fill();
534 double myStep = (
static_cast< double >( myColorRampItemList.size() ) - 1 ) /
static_cast< double >( mySize * mySize );
535 double myValue = 0.0;
536 for (
int myRow = 0; myRow < mySize; myRow++ )
538 QRgb *myLineBuffer =
reinterpret_cast< QRgb *
>( myQImage.scanLine( myRow ) );
539 for (
int myCol = 0; myCol < mySize; myCol++ )
541 myValue = myStep *
static_cast< double >( myCol + myRow * mySize );
543 myShader.
shade( myValue, &c1, &c2, &c3, &c4 );
544 myLineBuffer[ myCol ] = qRgba( c1, c2, c3, c4 );
548 myQPainter.drawImage( 0, 0, myQImage );
549 return myPalettePixmap;
551 QPixmap myNullPixmap;
557 QPixmap myNullPixmap;
575 if ( mDataProvider &&
585 if ( mDataProvider &&
593 void QgsRasterLayer::init()
611 mPipe.
remove( mDataProvider );
612 mDataProvider =
nullptr;
626 std::unique_ptr< QgsScopedRuntimeProfile > profile;
628 profile = qgis::make_unique< QgsScopedRuntimeProfile >( tr(
"Create %1 provider" ).arg( provider ), QStringLiteral(
"projectload" ) );
631 if ( !mDataProvider )
638 mDataProvider->setParent(
this );
641 mPipe.
set( mDataProvider );
642 if ( !mDataProvider->
isValid() )
652 QgsDebugMsgLevel( QStringLiteral(
"Set Data provider QgsLayerMetadata identifier[%1]" ).arg(
metadata().identifier() ), 4 );
655 if ( provider == QLatin1String(
"gdal" ) )
687 if ( ( mDataProvider->
bandCount() > 1 ) )
735 QList<QgsColorRampShader::ColorRampItem> colorTable = mDataProvider->
colorTable( 1 );
758 for (
int bandNo = 1; bandNo <= mDataProvider->
bandCount(); bandNo++ )
762 if (
auto *lRenderer = mPipe.
renderer() )
764 lRenderer->setAlphaBand( bandNo );
785 QString resampling = settings.
value( QStringLiteral(
"/Raster/defaultZoomedInResampling" ), QStringLiteral(
"nearest neighbour" ) ).toString();
786 if ( resampling == QLatin1String(
"bilinear" ) )
791 else if ( resampling == QLatin1String(
"cubic" ) )
796 resampling = settings.
value( QStringLiteral(
"/Raster/defaultZoomedOutResampling" ), QStringLiteral(
"nearest neighbour" ) ).toString();
797 if ( resampling == QLatin1String(
"bilinear" ) )
803 const double maxOversampling = settings.
value( QStringLiteral(
"/Raster/defaultOversampling" ), 2.0 ).toDouble();
808 settings.
value( QStringLiteral(
"/Raster/defaultEarlyResampling" ),
false ).toBool() )
820 mPipe.
set( projector );
868 QDomImplementation domImplementation;
869 QDomDocumentType documentType;
873 if ( hadRenderer && ! loadDefaultStyleFlag )
875 documentType = domImplementation.createDocumentType(
876 QStringLiteral(
"qgis" ), QStringLiteral(
"http://mrcc.com/qgis.dtd" ), QStringLiteral(
"SYSTEM" ) );
878 QDomDocument doc = QDomDocument( documentType );
879 QDomElement styleElem = doc.createElement( QStringLiteral(
"qgis" ) );
880 styleElem.setAttribute( QStringLiteral(
"version" ),
Qgis::version() );
884 QgsDebugMsg( QStringLiteral(
"Could not store symbology for layer %1: %2" )
890 doc.appendChild( styleElem );
892 mOriginalStyleDocument = doc;
893 mOriginalStyleElement = styleElem;
902 for (
int i = mPipe.
size() - 1; i >= 0; --i )
910 QgsDataProvider::ReadFlags
flags = QgsDataProvider::ReadFlags();
924 bool defaultLoadedFlag =
false;
925 bool restoredStyle =
false;
926 if ( loadDefaultStyleFlag )
930 else if ( !mOriginalStyleElement.isNull() )
933 if ( !
readSymbology( mOriginalStyleElement, errorMsg, readContext ) )
935 QgsDebugMsg( QStringLiteral(
"Could not restore symbology for layer %1: %2" )
942 restoredStyle =
true;
949 if ( !defaultLoadedFlag && !restoredStyle )
958 void QgsRasterLayer::closeDataProvider()
961 mPipe.
remove( mDataProvider );
962 mDataProvider =
nullptr;
965 void QgsRasterLayer::computeMinMax(
int band,
970 double &min,
double &max )
973 min = std::numeric_limits<double>::quiet_NaN();
974 max = std::numeric_limits<double>::quiet_NaN();
975 if ( !mDataProvider )
994 QgsDebugMsgLevel( QStringLiteral(
"myLower = %1 myUpper = %2" ).arg( myLower ).arg( myUpper ), 4 );
997 QgsDebugMsgLevel( QStringLiteral(
"band = %1 min = %2 max = %3" ).arg( band ).arg( min ).arg( max ), 4 );
1003 return mDataProvider ? mDataProvider->
ignoreExtents() :
false;
1008 return mTemporalProperties;
1017 generateLookupTableFlag,
1025 bool generateLookupTableFlag,
1029 if ( !rasterRenderer || !mDataProvider )
1035 QList<QgsContrastEnhancement *> myEnhancements;
1041 QString rendererType = rasterRenderer->
type();
1042 if ( rendererType == QLatin1String(
"singlebandgray" ) )
1045 if ( !myGrayRenderer )
1049 myBands << myGrayRenderer->
grayBand();
1050 myRasterRenderer = myGrayRenderer;
1053 else if ( rendererType == QLatin1String(
"multibandcolor" ) )
1056 if ( !myMultiBandRenderer )
1061 myRasterRenderer = myMultiBandRenderer;
1064 else if ( rendererType == QLatin1String(
"singlebandpseudocolor" ) )
1067 if ( !myPseudoColorRenderer )
1071 myBands << myPseudoColorRenderer->
band();
1072 myRasterRenderer = myPseudoColorRenderer;
1073 myMinMaxOrigin = myPseudoColorRenderer->
minMaxOrigin();
1080 const auto constMyBands = myBands;
1081 for (
int myBand : constMyBands )
1087 myEnhancement->setContrastEnhancementAlgorithm(
algorithm, generateLookupTableFlag );
1091 computeMinMax( myBand, myMinMaxOrigin, limits,
extent, sampleSize, min, max );
1093 if ( rendererType == QLatin1String(
"singlebandpseudocolor" ) )
1097 if ( myPseudoColorRenderer->
shader() )
1100 if ( colorRampShader )
1108 myEnhancement->setMinimumValue( min );
1109 myEnhancement->setMaximumValue( max );
1110 myEnhancements.append( myEnhancement.release() );
1115 myEnhancements.append(
nullptr );
1119 if ( rendererType == QLatin1String(
"singlebandgray" ) )
1123 else if ( rendererType == QLatin1String(
"multibandcolor" ) )
1131 qDeleteAll( myEnhancements );
1139 if ( myRasterRenderer )
1144 if ( rasterRenderer ==
renderer() )
1196 if ( mDataProvider &&
1197 mLastRectangleUsedByRefreshContrastEnhancementIfNeeded !=
extent &&
1201 refreshRenderer( rasterRenderer,
extent );
1207 if ( mDataProvider )
1223 mLastRectangleUsedByRefreshContrastEnhancementIfNeeded =
extent;
1226 computeMinMax( sbpcr->
band(),
1236 if ( colorRampShader )
1249 if ( colorRampShader )
1264 mLastRectangleUsedByRefreshContrastEnhancementIfNeeded =
extent;
1274 if ( singleBandRenderer )
1276 else if ( multiBandRenderer )
1300 if ( !
isValid() || !mDataProvider )
1302 QgsDebugMsgLevel( QStringLiteral(
"invoked with invalid layer or null mDataProvider" ), 3 );
1303 return customProperty( QStringLiteral(
"storedSubsetString" ) ).toString();
1314 if ( !
isValid() || !mDataProvider )
1316 QgsDebugMsgLevel( QStringLiteral(
"invoked with invalid layer or null mDataProvider or while editing" ), 3 );
1352 QString defaultLimits;
1357 key = QStringLiteral(
"singleBand" );
1367 key = QStringLiteral(
"multiBandSingleByte" );
1375 key = QStringLiteral(
"multiBandMultiByte" );
1383 if ( key.isEmpty() )
1385 QgsDebugMsgLevel( QStringLiteral(
"No default contrast enhancement for this drawing style" ), 2 );
1392 QString myAlgorithmString = mySettings.
value(
"/Raster/defaultContrastEnhancementAlgorithm/" + key, defaultAlg ).toString();
1397 QString myLimitsString = mySettings.
value(
"/Raster/defaultContrastEnhancementLimits/" + key, defaultLimits ).toString();
1419 if ( mDataProvider )
1421 QgsDebugMsgLevel( QStringLiteral(
"About to mDataProvider->setLayerOrder(layers)." ), 4 );
1430 if ( mDataProvider )
1432 QgsDebugMsgLevel( QStringLiteral(
"About to mDataProvider->setSubLayerVisibility(name, vis)." ), 4 );
1440 if ( !mDataProvider )
1447 if (
auto *lRenderer = mPipe.
renderer() )
1449 if ( !lRenderer->accept( visitor ) )
1458 Q_UNUSED( errorMessage )
1470 QDomElement constraintElem = doc.createElement( QStringLiteral(
"sld:LayerFeatureConstraints" ) );
1471 node.appendChild( constraintElem );
1473 QDomElement featureTypeConstraintElem = doc.createElement( QStringLiteral(
"sld:FeatureTypeConstraint" ) );
1474 constraintElem.appendChild( featureTypeConstraintElem );
1476 QDomElement userStyleElem = doc.createElement( QStringLiteral(
"sld:UserStyle" ) );
1477 node.appendChild( userStyleElem );
1479 if ( !
name().isEmpty() )
1481 QDomElement nameElem = doc.createElement( QStringLiteral(
"sld:Name" ) );
1482 nameElem.appendChild( doc.createTextNode(
name() ) );
1483 userStyleElem.appendChild( nameElem );
1486 if ( !
abstract().isEmpty() )
1488 QDomElement abstractElem = doc.createElement( QStringLiteral(
"sld:Abstract" ) );
1489 abstractElem.appendChild( doc.createTextNode(
abstract() ) );
1490 userStyleElem.appendChild( abstractElem );
1493 if ( !
title().isEmpty() )
1495 QDomElement titleElem = doc.createElement( QStringLiteral(
"sld:Title" ) );
1496 titleElem.appendChild( doc.createTextNode(
title() ) );
1497 userStyleElem.appendChild( titleElem );
1500 QDomElement featureTypeStyleElem = doc.createElement( QStringLiteral(
"sld:FeatureTypeStyle" ) );
1501 userStyleElem.appendChild( featureTypeStyleElem );
1511 QDomElement typeStyleNameElem = doc.createElement( QStringLiteral(
"sld:Name" ) );
1512 featureTypeStyleElem.appendChild( typeStyleNameElem );
1515 QDomElement typeStyleRuleElem = doc.createElement( QStringLiteral(
"sld:Rule" ) );
1516 featureTypeStyleElem.appendChild( typeStyleRuleElem );
1524 QDomElement minScaleElem = doc.createElement( QStringLiteral(
"sld:MinScaleDenominator" ) );
1525 minScaleElem.appendChild( doc.createTextNode( QString::number(
maximumScale() ) ) );
1526 typeStyleRuleElem.appendChild( minScaleElem );
1529 QDomElement maxScaleElem = doc.createElement( QStringLiteral(
"sld:MaxScaleDenominator" ) );
1530 maxScaleElem.appendChild( doc.createTextNode( QString::number(
minimumScale() ) ) );
1531 typeStyleRuleElem.appendChild( maxScaleElem );
1535 mPipe.
renderer()->
toSld( doc, typeStyleRuleElem, localProps );
1540 QDomNodeList elements = typeStyleRuleElem.elementsByTagName( QStringLiteral(
"sld:RasterSymbolizer" ) );
1541 if ( elements.size() != 0 )
1544 QDomElement rasterSymbolizerElem = elements.at( 0 ).toElement();
1547 auto vendorOptionWriter = [&]( QString
name, QString value )
1549 QDomElement vendorOptionElem = doc.createElement( QStringLiteral(
"sld:VendorOption" ) );
1550 vendorOptionElem.setAttribute( QStringLiteral(
"name" ),
name );
1551 vendorOptionElem.appendChild( doc.createTextNode( value ) );
1552 rasterSymbolizerElem.appendChild( vendorOptionElem );
1562 property = QStringLiteral(
"lightness" );
1565 property = QStringLiteral(
"luminosity" );
1568 property = QStringLiteral(
"average" );
1574 if ( !property.isEmpty() )
1575 vendorOptionWriter( QStringLiteral(
"grayScale" ), property );
1581 vendorOptionWriter( QStringLiteral(
"colorizeOn" ), QString::number(
hueSaturationFilter()->colorizeOn() ) );
1582 vendorOptionWriter( QStringLiteral(
"colorizeRed" ), QString::number(
hueSaturationFilter()->colorizeColor().red() ) );
1583 vendorOptionWriter( QStringLiteral(
"colorizeGreen" ), QString::number(
hueSaturationFilter()->colorizeColor().green() ) );
1584 vendorOptionWriter( QStringLiteral(
"colorizeBlue" ), QString::number(
hueSaturationFilter()->colorizeColor().blue() ) );
1586 vendorOptionWriter( QStringLiteral(
"colorizeStrength" ), QString::number(
hueSaturationFilter()->colorizeStrength() / 100.0 ) );
1587 vendorOptionWriter( QStringLiteral(
"saturation" ), QString::number(
hueSaturationFilter()->colorizeColor().saturationF() ) );
1596 double sF = ( s - ( -100.0 ) ) / ( 100.0 - ( -100.0 ) );
1597 vendorOptionWriter( QStringLiteral(
"saturation" ), QString::number( sF ) );
1606 double bF = ( b - ( -255.0 ) ) / ( 255.0 - ( -255.0 ) );
1607 vendorOptionWriter( QStringLiteral(
"brightness" ), QString::number( bF ) );
1615 double cF = (
c - ( -100.0 ) ) / ( 100.0 - ( -100.0 ) );
1616 vendorOptionWriter( QStringLiteral(
"contrast" ), QString::number( cF ) );
1630 if ( newProps.contains( QStringLiteral(
"contrast" ) ) )
1633 double contrast = newProps[ QStringLiteral(
"contrast" ) ].toDouble();
1634 double percentage = ( contrast - ( -100.0 ) ) / ( 100.0 - ( -100.0 ) );
1635 if ( percentage <= 0.5 )
1638 gamma = percentage / 0.5;
1645 QDomElement globalContrastEnhancementElem = doc.createElement( QStringLiteral(
"sld:ContrastEnhancement" ) );
1646 rasterSymolizerElem.appendChild( globalContrastEnhancementElem );
1648 QDomElement gammaValueElem = doc.createElement( QStringLiteral(
"sld:GammaValue" ) );
1649 gammaValueElem.appendChild( doc.createTextNode( QString::number( gamma ) ) );
1650 globalContrastEnhancementElem.appendChild( gammaValueElem );
1683 if ( mDataProvider )
1689 if ( ! mDataProvider )
1690 return QStringList();
1698 QImage image( size, format );
1703 if ( image.format() == QImage::Format_Indexed8 )
1705 image.setColor( 0, bgColor.rgba() );
1710 image.fill( bgColor );
1715 double mapUnitsPerPixel;
1721 mapUnitsPerPixel =
extent.
width() / image.width();
1722 y = ( image.height() -
extent.
height() / mapUnitsPerPixel ) / 2;
1727 x = ( image.width() -
extent.
width() / mapUnitsPerPixel ) / 2;
1730 const double pixelWidth =
extent.
width() / mapUnitsPerPixel;
1731 const double pixelHeight =
extent.
height() / mapUnitsPerPixel;
1735 rasterViewPort->
mWidth = image.width();
1736 rasterViewPort->
mHeight = image.height();
1744 QPainter *painter =
new QPainter( &image );
1745 draw( painter, rasterViewPort, mapToPixel );
1746 delete rasterViewPort;
1768 Q_UNUSED( errorMessage )
1771 QDomElement rasterRendererElem;
1773 QDomElement layerElement = layer_node.toElement();
1780 QDomNode pipeNode = layer_node.firstChildElement( QStringLiteral(
"pipe" ) );
1781 if ( pipeNode.isNull() )
1783 pipeNode = layer_node;
1787 if ( !layer_node.firstChildElement( QStringLiteral(
"rasterproperties" ) ).isNull() )
1790 QDomNode layerNodeCopy = layer_node.cloneNode();
1791 QDomDocument doc = layerNodeCopy.ownerDocument();
1792 QDomElement rasterPropertiesElem = layerNodeCopy.firstChildElement( QStringLiteral(
"rasterproperties" ) );
1795 rasterRendererElem = layerNodeCopy.firstChildElement( QStringLiteral(
"rasterrenderer" ) );
1800 rasterRendererElem = pipeNode.firstChildElement( QStringLiteral(
"rasterrenderer" ) );
1803 if ( !rasterRendererElem.isNull() )
1805 QString rendererType = rasterRendererElem.attribute( QStringLiteral(
"type" ) );
1819 QDomElement brightnessElem = pipeNode.firstChildElement( QStringLiteral(
"brightnesscontrast" ) );
1820 if ( !brightnessElem.isNull() )
1830 QDomElement hueSaturationElem = pipeNode.firstChildElement( QStringLiteral(
"huesaturation" ) );
1831 if ( !hueSaturationElem.isNull() )
1841 QDomElement resampleElem = pipeNode.firstChildElement( QStringLiteral(
"rasterresampler" ) );
1842 if ( !resampleElem.isNull() )
1848 if ( mDataProvider )
1850 QDomElement providerElem = pipeNode.firstChildElement( QStringLiteral(
"provider" ) );
1851 if ( !providerElem.isNull() )
1853 mDataProvider->
readXml( providerElem );
1858 QDomNode resamplingStageElement = pipeNode.namedItem( QStringLiteral(
"resamplingStage" ) );
1859 if ( !resamplingStageElement.isNull() )
1861 QDomElement e = resamplingStageElement.toElement();
1862 if ( e.text() == QLatin1String(
"provider" ) )
1864 else if ( e.text() == QLatin1String(
"resamplingFilter" ) )
1869 QDomNode blendModeNode = layer_node.namedItem( QStringLiteral(
"blendMode" ) );
1870 if ( !blendModeNode.isNull() )
1872 QDomElement e = blendModeNode.toElement();
1883 return readSymbology( node, errorMessage, context, categories );
1892 QDomNode pkeyNode = layer_node.namedItem( QStringLiteral(
"provider" ) );
1894 if ( pkeyNode.isNull() )
1900 QDomElement pkeyElt = pkeyNode.toElement();
1914 QDomNode rpNode = layer_node.namedItem( QStringLiteral(
"rasterproperties" ) );
1920 if ( !
mDataSource.contains( QLatin1String(
"crs=" ) ) && !
mDataSource.contains( QLatin1String(
"format=" ) ) )
1922 QgsDebugMsgLevel( QStringLiteral(
"Old WMS URI format detected -> adding params" ), 4 );
1925 QDomElement layerElement = rpNode.firstChildElement( QStringLiteral(
"wmsSublayer" ) );
1926 while ( !layerElement.isNull() )
1931 uri.
setParam( QStringLiteral(
"layers" ), layerElement.namedItem( QStringLiteral(
"name" ) ).toElement().text() );
1934 uri.
setParam( QStringLiteral(
"styles" ), layerElement.namedItem( QStringLiteral(
"style" ) ).toElement().text() );
1936 layerElement = layerElement.nextSiblingElement( QStringLiteral(
"wmsSublayer" ) );
1940 uri.
setParam( QStringLiteral(
"format" ), rpNode.namedItem( QStringLiteral(
"wmsFormat" ) ).toElement().text() );
1944 uri.
setParam( QStringLiteral(
"crs" ),
crs().authid() );
1953 QgsDataProvider::ReadFlags
flags = QgsDataProvider::ReadFlags();
1961 mOriginalStyleElement = layer_node.namedItem( QStringLiteral(
"originalStyle" ) ).firstChildElement();
1962 if ( mOriginalStyleElement.isNull() )
1963 mOriginalStyleElement = layer_node.toElement();
1964 mOriginalStyleDocument = layer_node.ownerDocument();
1966 if ( ! mDataProvider )
1990 QDomNode stampNode = layer_node.namedItem(
"timestamp" );
1991 if ( !stampNode.isNull() )
1993 QDateTime stamp = QDateTime::fromString( stampNode.toElement().text(), Qt::ISODate );
1995 if ( stamp < mDataProvider->dataTimestamp() )
1998 closeDataProvider();
2001 if ( !
isValid() )
return false;
2007 QDomElement noDataElement = layer_node.firstChildElement( QStringLiteral(
"noData" ) );
2009 QDomNodeList noDataBandList = noDataElement.elementsByTagName( QStringLiteral(
"noDataList" ) );
2011 for (
int i = 0; i < noDataBandList.size(); ++i )
2013 QDomElement bandElement = noDataBandList.at( i ).toElement();
2015 int bandNo = bandElement.attribute( QStringLiteral(
"bandNo" ) ).toInt( &ok );
2017 if ( ok && ( bandNo > 0 ) && ( bandNo <= mDataProvider->
bandCount() ) )
2019 mDataProvider->
setUseSourceNoDataValue( bandNo, bandElement.attribute( QStringLiteral(
"useSrcNoData" ) ).toInt() );
2022 QDomNodeList rangeList = bandElement.elementsByTagName( QStringLiteral(
"noDataRange" ) );
2024 myNoDataRangeList.reserve( rangeList.size() );
2025 for (
int j = 0; j < rangeList.size(); ++j )
2027 QDomElement rangeElement = rangeList.at( j ).toElement();
2028 QgsRasterRange myNoDataRange( rangeElement.attribute( QStringLiteral(
"min" ) ).toDouble(),
2029 rangeElement.attribute( QStringLiteral(
"max" ) ).toDouble() );
2030 QgsDebugMsgLevel( QStringLiteral(
"min = %1 %2" ).arg( rangeElement.attribute(
"min" ) ).arg( myNoDataRange.
min() ), 4 );
2031 myNoDataRangeList << myNoDataRange;
2045 Q_UNUSED( errorMessage )
2048 QDomElement layerElement = layer_node.toElement();
2053 QDomElement pipeElement = document.createElement( QStringLiteral(
"pipe" ) );
2055 for (
int i = 0; i < mPipe.
size(); i++ )
2058 if ( !interface )
continue;
2059 interface->
writeXml( document, pipeElement );
2062 QDomElement resamplingStageElement = document.createElement( QStringLiteral(
"resamplingStage" ) );
2064 resamplingStageElement.appendChild( resamplingStageText );
2065 pipeElement.appendChild( resamplingStageElement );
2067 layer_node.appendChild( pipeElement );
2069 if ( !
isValid() && !mOriginalStyleElement.isNull() )
2071 QDomElement originalStyleElement = document.createElement( QStringLiteral(
"originalStyle" ) );
2072 originalStyleElement.appendChild( mOriginalStyleElement );
2073 layer_node.appendChild( originalStyleElement );
2077 QDomElement blendModeElement = document.createElement( QStringLiteral(
"blendMode" ) );
2079 blendModeElement.appendChild( blendModeText );
2080 layer_node.appendChild( blendModeElement );
2088 return writeSymbology( node, doc, errorMessage, context, categories );
2096 QDomDocument &document,
2101 QDomElement mapLayerNode = layer_node.toElement();
2103 if ( mapLayerNode.isNull() ||
"maplayer" != mapLayerNode.nodeName() )
2109 mapLayerNode.setAttribute( QStringLiteral(
"type" ), QStringLiteral(
"raster" ) );
2113 QDomElement provider = document.createElement( QStringLiteral(
"provider" ) );
2114 QDomText providerText = document.createTextNode(
mProviderKey );
2115 provider.appendChild( providerText );
2116 layer_node.appendChild( provider );
2119 QDomElement noData = document.createElement( QStringLiteral(
"noData" ) );
2121 for (
int bandNo = 1; bandNo <= mDataProvider->
bandCount(); bandNo++ )
2123 QDomElement noDataRangeList = document.createElement( QStringLiteral(
"noDataList" ) );
2124 noDataRangeList.setAttribute( QStringLiteral(
"bandNo" ), bandNo );
2125 noDataRangeList.setAttribute( QStringLiteral(
"useSrcNoData" ), mDataProvider->
useSourceNoDataValue( bandNo ) );
2127 const auto constUserNoDataValues = mDataProvider->
userNoDataValues( bandNo );
2130 QDomElement noDataRange = document.createElement( QStringLiteral(
"noDataRange" ) );
2134 noDataRangeList.appendChild( noDataRange );
2137 noData.appendChild( noDataRangeList );
2140 if ( noData.hasChildNodes() )
2142 layer_node.appendChild( noData );
2149 return writeSymbology( layer_node, document, errorMsg, context );
2153 static bool _parseGpkgColons(
const QString &src, QString &filename, QString &tablename )
2158 QStringList lst = src.split(
':' );
2159 if ( lst.count() != 3 && lst.count() != 4 )
2162 tablename = lst.last();
2163 if ( lst.count() == 3 )
2168 else if ( lst.count() == 4 && lst[1].count() == 1 && ( lst[2][0] ==
'/' || lst[2][0] ==
'\\' ) )
2171 filename = lst[1] +
":" + lst[2];
2181 bool handled =
false;
2186 if ( src.startsWith( QLatin1String(
"NETCDF:" ) ) )
2190 QRegExp r(
"NETCDF:(.+):([^:]+)" );
2191 if ( r.exactMatch( src ) )
2193 QString filename = r.cap( 1 );
2194 if ( filename.startsWith(
'"' ) && filename.endsWith(
'"' ) )
2195 filename = filename.mid( 1, filename.length() - 2 );
2200 else if ( src.startsWith( QLatin1String(
"GPKG:" ) ) )
2203 QString filename, tablename;
2204 if ( _parseGpkgColons( src, filename, tablename ) )
2207 src = QStringLiteral(
"GPKG:%1:%2" ).arg( filename, tablename );
2211 else if ( src.startsWith( QLatin1String(
"HDF4_SDS:" ) ) )
2215 QRegExp r(
"HDF4_SDS:([^:]+):(.+):([^:]+)" );
2216 if ( r.exactMatch( src ) )
2218 QString filename = r.cap( 2 );
2219 if ( filename.startsWith(
'"' ) && filename.endsWith(
'"' ) )
2220 filename = filename.mid( 1, filename.length() - 2 );
2221 src =
"HDF4_SDS:" + r.cap( 1 ) +
":\"" + context.
pathResolver().
writePath( filename ) +
"\":" + r.cap( 3 );
2225 else if ( src.startsWith( QLatin1String(
"HDF5:" ) ) )
2229 QRegExp r(
"HDF5:(.+):([^:]+)" );
2230 if ( r.exactMatch( src ) )
2232 QString filename = r.cap( 1 );
2233 if ( filename.startsWith(
'"' ) && filename.endsWith(
'"' ) )
2234 filename = filename.mid( 1, filename.length() - 2 );
2239 else if ( src.contains( QRegExp(
"^(NITF_IM|RADARSAT_2_CALIB):" ) ) )
2243 QRegExp r(
"([^:]+):([^:]+):(.+)" );
2244 if ( r.exactMatch( src ) )
2256 QUrl srcUrl( uri.
param( QStringLiteral(
"url" ) ) );
2257 if ( srcUrl.isLocalFile() )
2262 uri.
setParam( QStringLiteral(
"url" ), QUrl::fromLocalFile( relSrcUrl ).toString() );
2278 if ( provider == QLatin1String(
"wms" ) )
2292 if ( !src.contains( QLatin1String(
"type=" ) ) &&
2293 !src.contains( QLatin1String(
"crs=" ) ) && !src.contains( QLatin1String(
"format=" ) ) )
2295 QgsDebugMsgLevel( QStringLiteral(
"Old WMS URI format detected -> converting to new format" ), 2 );
2297 if ( !src.startsWith( QLatin1String(
"http:" ) ) )
2299 QStringList parts = src.split(
',' );
2300 QStringListIterator iter( parts );
2301 while ( iter.hasNext() )
2303 QString item = iter.next();
2304 if ( item.startsWith( QLatin1String(
"username=" ) ) )
2308 else if ( item.startsWith( QLatin1String(
"password=" ) ) )
2312 else if ( item.startsWith( QLatin1String(
"tiled=" ) ) )
2318 QStringList params = item.mid( 6 ).split(
';' );
2320 if ( params.size() == 2 )
2322 uri.
setParam( QStringLiteral(
"maxWidth" ), params.takeFirst() );
2323 uri.
setParam( QStringLiteral(
"maxHeight" ), params.takeFirst() );
2325 else if ( params.size() > 2 )
2329 uri.
setParam( QStringLiteral(
"tileMatrixSet" ), QString() );
2332 else if ( item.startsWith( QLatin1String(
"featureCount=" ) ) )
2334 uri.
setParam( QStringLiteral(
"featureCount" ), item.mid( 13 ) );
2336 else if ( item.startsWith( QLatin1String(
"url=" ) ) )
2338 uri.
setParam( QStringLiteral(
"url" ), item.mid( 4 ) );
2340 else if ( item.startsWith( QLatin1String(
"ignoreUrl=" ) ) )
2342 uri.
setParam( QStringLiteral(
"ignoreUrl" ), item.mid( 10 ).split(
';' ) );
2348 uri.
setParam( QStringLiteral(
"url" ), src );
2359 QUrl srcUrl( uri.
param( QStringLiteral(
"url" ) ) );
2360 if ( srcUrl.isLocalFile() )
2364 uri.
setParam( QStringLiteral(
"url" ), QUrl::fromLocalFile( absSrcUrl ).toString() );
2371 bool handled =
false;
2373 if ( provider == QLatin1String(
"gdal" ) )
2375 if ( src.startsWith( QLatin1String(
"NETCDF:" ) ) )
2379 QRegExp r(
"NETCDF:(.+):([^:]+)" );
2380 if ( r.exactMatch( src ) )
2382 QString filename = r.cap( 1 );
2383 if ( filename.startsWith(
'"' ) && filename.endsWith(
'"' ) )
2384 filename = filename.mid( 1, filename.length() - 2 );
2389 else if ( src.startsWith( QLatin1String(
"GPKG:" ) ) )
2392 QString filename, tablename;
2393 if ( _parseGpkgColons( src, filename, tablename ) )
2396 src = QStringLiteral(
"GPKG:%1:%2" ).arg( filename, tablename );
2400 else if ( src.startsWith( QLatin1String(
"HDF4_SDS:" ) ) )
2404 QRegExp r(
"HDF4_SDS:([^:]+):(.+):([^:]+)" );
2405 if ( r.exactMatch( src ) )
2407 QString filename = r.cap( 2 );
2408 if ( filename.startsWith(
'"' ) && filename.endsWith(
'"' ) )
2409 filename = filename.mid( 1, filename.length() - 2 );
2410 src =
"HDF4_SDS:" + r.cap( 1 ) +
":\"" + context.
pathResolver().
readPath( filename ) +
"\":" + r.cap( 3 );
2414 else if ( src.startsWith( QLatin1String(
"HDF5:" ) ) )
2418 QRegExp r(
"HDF5:(.+):([^:]+)" );
2419 if ( r.exactMatch( src ) )
2421 QString filename = r.cap( 1 );
2422 if ( filename.startsWith(
'"' ) && filename.endsWith(
'"' ) )
2423 filename = filename.mid( 1, filename.length() - 2 );
2428 else if ( src.contains( QRegExp(
"^(NITF_IM|RADARSAT_2_CALIB):" ) ) )
2432 QRegExp r(
"([^:]+):([^:]+):(.+)" );
2433 if ( r.exactMatch( src ) )
2450 if ( !mDataProvider )
return 0;
2451 return mDataProvider->
xSize();
2456 if ( !mDataProvider )
return 0;
2457 return mDataProvider->
ySize();
2470 bool QgsRasterLayer::update()
2477 closeDataProvider();
2480 QgsDataProvider::ReadFlags
flags = QgsDataProvider::ReadFlags();
void setContrastEnhancement(QgsContrastEnhancement *ce)
Takes ownership.
void setError(const QgsError &error)
Sets error message.
void willBeDeleted()
Emitted in the destructor when the layer is about to be deleted, but it is still in a perfectly valid...
static QgsRasterRendererRegistry * rasterRendererRegistry()
Returns the application's raster renderer registry, used for managing raster layer renderers.
QgsPointXY mBottomRightPoint
Coordinate (in output device coordinate system) of bottom right corner of the part of the raster that...
virtual bool hasStatistics(int bandNo, int stats=QgsRasterBandStats::All, const QgsRectangle &extent=QgsRectangle(), int sampleSize=0)
Returns true if histogram is available (cached, already calculated).
void setGreenContrastEnhancement(QgsContrastEnhancement *ce)
Takes ownership.
virtual void setUserNoDataValue(int bandNo, const QgsRasterRangeList &noData)
QgsCoordinateReferenceSystem crs
void readCommonStyle(const QDomElement &layerElement, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories)
Read style data common to all layer types.
static QString printValue(double value)
Print double value with all necessary significant digits.
@ Float32
Thirty two bit floating point (float)
double height() const SIP_HOLDGIL
Returns the height of the rectangle.
QPixmap paletteAsPixmap(int bandNumber=1)
Returns a 100x100 pixmap of the color palette.
int bandCount() const
Returns the number of bands in this layer.
virtual QString generateBandName(int bandNumber) const
helper function to create zero padded band names
bool writeSymbology(QDomNode &, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) const override
DataType
Raster data types.
Class for storing the component parts of a RDBMS data source URI (e.g.
void readXml(const QDomElement &filterElem) override
Sets base class members from xml. Usually called from create() methods of subclasses.
static QString version()
Version string.
Contains information about the context in which a coordinate transform is executed.
@ FlagTrustLayerMetadata
Trust layer metadata. Improves layer load time by skipping expensive checks like primary key unicity,...
void configChanged()
Emitted whenever the configuration is changed.
@ UInt32
Thirty two bit unsigned integer (quint32)
virtual bool supportsSubsetString() const
Returns true if the provider supports setting of subset strings.
Qgis::DataType dataType(int bandNo) const override=0
Returns data type for the band specified by number.
Setting options for creating vector data providers.
BlendMode
Blending modes enum defining the available composition modes that can be used when rendering a layer.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
bool ignoreExtents() const
If the ignoreExtent flag is set, the layer will also render outside the bounding box reported by the ...
virtual QgsRasterBandStats bandStatistics(int bandNo, int stats=QgsRasterBandStats::All, const QgsRectangle &extent=QgsRectangle(), int sampleSize=0, QgsRasterBlockFeedback *feedback=nullptr)
Returns the band statistics.
The class is used as a container of context for various read/write operations on other objects.
@ ResampleFilter
Resampling occurs in ResamplingFilter.
void setLayerOrder(const QStringList &layers) override
Reorders the previously selected sublayers of this layer from bottom to top.
Abstract base class for spatial data provider implementations.
@ SingleBandColorDataStyle
const QgsRasterMinMaxOrigin & minMaxOrigin() const
Returns const reference to origin of min/max values.
void setResamplingStage(QgsRasterPipe::ResamplingStage stage)
Select which stage of the pipe should apply resampling.
bool writeSld(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsStringMap &props=QgsStringMap()) const
Writes the symbology of the layer into the document provided in SLD 1.0.0 format.
QString userFriendlyIdentifier(IdentifierType type=MediumString) const
Returns a user friendly identifier for the CRS.
QStringList subLayers() const override
Returns the sublayers of this layer - useful for providers that manage their own layers,...
#define QgsDebugMsgLevel(str, level)
bool readSymbology(const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) override
virtual bool useSourceNoDataValue(int bandNo) const
Returns the source nodata value usage.
@ AlphaBand
Alpha (0=transparent, 255=opaque)
bool defaultContrastEnhancementSettings(QgsContrastEnhancement::ContrastEnhancementAlgorithm &myAlgorithm, QgsRasterMinMaxOrigin::Limits &myLimits) const
Returns default contrast enhancement settings for that type of raster.
const QgsContrastEnhancement * redContrastEnhancement() const
virtual void setSubLayerVisibility(const QString &name, bool vis)
Set the visibility of the given sublayer name.
QgsRasterPipe::ResamplingStage resamplingStage() const
Returns which stage of the pipe should apply resampling.
virtual QgsMapLayer * clone() const =0
Returns a new instance equivalent to this one except for the id which is still unique.
QPainter::CompositionMode blendMode() const
Returns the current blending mode for a layer.
void setDefaultContrastEnhancement()
Sets the default contrast enhancement.
Limits
This enumerator describes the limits used to compute min/max values.
Q_INVOKABLE void setCustomProperty(const QString &key, const QVariant &value)
Set a custom property for layer.
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 allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call
@ WKT_PREFERRED
Preferred format, matching the most recent WKT ISO standard. Currently an alias to WKT2_2019,...
virtual void cumulativeCut(int bandNo, double lowerCount, double upperCount, double &lowerValue, double &upperValue, const QgsRectangle &extent=QgsRectangle(), int sampleSize=0)
Find values for cumulative pixel count cut.
The RasterBandStats struct is a container for statistics about a single raster band.
QgsMapLayer::ReadFlags mReadFlags
Read flags. It's up to the subclass to respect these when restoring state from XML.
@ Cubic
Bicubic resamplikng.
void setShader(QgsRasterShader *shader)
Takes ownership of the shader.
virtual bool setSubsetString(const QString &subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
bool skipCrsValidation
Controls whether the layer is allowed to have an invalid/unknown CRS.
bool set(QgsRasterInterface *interface)
Insert a new known interface in default place or replace interface of the same role if it already exi...
@ FlagTrustDataSource
Trust datasource config (primary key unicity, geometry type and srid, etc). Improves provider load ti...
QgsRasterShaderFunction * rasterShaderFunction()
QgsCoordinateReferenceSystem mSrcCRS
Source coordinate system.
@ ProviderHintCanPerformProviderResampling
Provider can perform resampling (to be opposed to post rendering resampling) (since QGIS 3....
QgsMapLayerType
Types of layers that can be added to a map.
QDateTime dataTimestamp() const override
Current time stamp of data source.
Registry for raster renderer entries.
static const double SAMPLE_SIZE
Default sample size (number of pixels) for estimated statistics/histogram calculation.
virtual QgsError error() const
Gets current status error.
double mean
The mean cell value for the band. NO_DATA values are excluded.
QgsRectangle extent() const override=0
Returns the extent of the layer.
DrawingStyle
This enumerator describes the different kinds of drawing we can do.
void classifyColorRamp(int classes=0, int band=-1, const QgsRectangle &extent=QgsRectangle(), QgsRasterInterface *input=nullptr)
Classify color ramp shader.
void statusChanged(const QString &status)
Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar)
QString decodedSource(const QString &source, const QString &provider, const QgsReadWriteContext &context) const override
Called by readLayerXML(), used by derived classes to decode provider's specific data source from proj...
const QgsContrastEnhancement * greenContrastEnhancement() const
Raster renderer pipe for single band gray.
Contains information about the context of a rendering operation.
An interface for classes which can visit style entity (e.g.
This class is a composition of two QSettings instances:
void subsetStringChanged()
Emitted when the layer's subset string has changed.
void setBlendMode(QPainter::CompositionMode blendMode)
Set the blending mode used for rendering a layer.
virtual void setTransformContext(const QgsCoordinateTransformContext &transformContext) override
Sets the coordinate transform context to transformContext.
double stdDevFactor() const
Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
void readCustomProperties(const QDomNode &layerNode, const QString &keyStartsWith=QString())
Read custom properties from project file.
virtual QString type() const
static const QgsContrastEnhancement::ContrastEnhancementAlgorithm MULTIPLE_BAND_SINGLE_BYTE_ENHANCEMENT_ALGORITHM
Default enhancement algorithm for multiple band raster of type Byte.
QString htmlMetadata() const override
Obtain a formatted HTML string containing assorted metadata for this layer.
QgsPointXY mTopLeftPoint
Coordinate (in output device coordinate system) of top left corner of the part of the raster that is ...
This class provides details of the viewable area that a raster will be rendered into.
virtual void toSld(QDomDocument &doc, QDomElement &element, const QgsStringMap &props=QgsStringMap()) const
Used from subclasses to create SLD Rule elements following SLD v1.0 specs.
int band() const
Returns the band used by the renderer.
void setDataSource(const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag=false) override
Updates the data source of the layer.
virtual bool setSubsetString(const QString &subset)
Sets the string (typically sql) used to define a subset of the layer.
QgsRasterRendererCreateFunc rendererCreateFunction
QgsCoordinateTransformContext transformContext() const
Returns data provider coordinate transform context.
virtual QString dataSourceUri(bool expandAuthConfig=false) const
Gets the data source specification.
double min() const
Returns the minimum value for the range.
void setRedContrastEnhancement(QgsContrastEnhancement *ce)
Takes ownership.
QImage previewAsImage(QSize size, const QColor &bgColor=Qt::white, QImage::Format format=QImage::Format_ARGB32_Premultiplied)
Draws a preview of the rasterlayer into a QImage.
void refreshContrastEnhancement(const QgsRectangle &extent)
Refresh contrast enhancement with new extent.
virtual void setMetadata(const QgsLayerMetadata &metadata)
Sets the layer's metadata store.
A ramp shader will color a raster pixel based on a list of values ranges in a ramp.
void setCrs(const QgsCoordinateReferenceSystem &srs, bool emitSignal=true)
Sets layer's spatial reference system.
static const QgsContrastEnhancement::ContrastEnhancementAlgorithm SINGLE_BAND_ENHANCEMENT_ALGORITHM
Default enhancement algorithm for single band raster.
static const QgsRasterMinMaxOrigin::Limits MULTIPLE_BAND_MULTI_BYTE_MIN_MAX_LIMITS
Default enhancement limits for multiple band raster of type different from Byte.
A rectangle specified with double values.
QgsLegendColorList legendSymbologyItems() const
Returns a list with classification items (Text and color)
void setRenderer(QgsRasterRenderer *renderer)
Sets the raster's renderer.
@ WholeRaster
Whole raster is used to compute statistics.
QString bandName(int bandNoInt) const
Returns the name of a band given its number.
bool mShouldValidateCrs
true if the layer's CRS should be validated and invalid CRSes are not permitted.
Implementation of map layer temporal properties for raster layers.
QString mProviderKey
Data provider key (name of the data provider)
@ CFloat32
Complex Float32.
static void mergeScaleDependencies(double mScaleMinDenom, double mScaleMaxDenom, QgsStringMap &props)
Merges the local scale limits, if any, with the ones already in the map, if any.
@ Bilinear
Bilinear resamplikng.
Bilinear Raster Resampler.
QgsCoordinateTransformContext transformContext() const
Returns data provider coordinate transform context.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
QgsRasterInterface * at(int idx) const
virtual bool setZoomedInResamplingMethod(ResamplingMethod method)
Set resampling method to apply for zoomed-in operations.
const QgsContrastEnhancement * contrastEnhancement() const
This class describes the origin of min/max values.
static QgsPainting::BlendMode getBlendModeEnum(QPainter::CompositionMode blendMode)
Returns a BlendMode corresponding to a QPainter::CompositionMode.
QString mLayerName
Name of the layer - used for display.
static bool isValidRasterFileName(const QString &fileNameQString, QString &retError)
This helper checks to see whether the file name appears to be a valid raster file name.
QgsRasterProjector implements approximate projection support for it calculates grid of points in sour...
void setClassificationMax(double max)
double maximumValue
The maximum cell value in the raster band.
QString param(const QString &key) const
Returns a generic parameter value corresponding to the specified key.
void dataSourceChanged()
Emitted whenever the layer's data source has been changed.
void readXml(const QDomElement &filterElem) override
Sets base class members from xml. Usually called from create() methods of subclasses.
@ Discrete
Assigns the color of the higher class for every pixel between two class breaks.
void setUsername(const QString &username)
Sets the username for the URI.
static QString contrastEnhancementAlgorithmString(ContrastEnhancementAlgorithm algorithm)
Returns a string to serialize ContrastEnhancementAlgorithm.
void setBlueContrastEnhancement(QgsContrastEnhancement *ce)
Takes ownership.
@ FlagDontResolveLayers
Don't resolve layer paths or create data providers for layers.
~QgsRasterLayer() override
QgsMapLayer::LayerFlags flags() const
Returns the flags for this layer.
@ CFloat64
Complex Float64.
QString writePath(const QString &filename) const
Prepare a filename to save it to the project file.
QStringList subLayers() const override
Returns the sublayers of this layer.
bool remove(int idx)
Remove and delete interface at given index if possible.
void setColorRampType(QgsColorRampShader::Type colorRampType)
Sets the color ramp type.
static int typeSize(int dataType) SIP_HOLDGIL
Returns the size in bytes for the specified dataType.
int width() const
Returns the width of the (unclipped) raster.
virtual void reloadData()
Reloads the data from the source by calling reloadProviderData() implemented by providers with data c...
static QDateTime lastModified(const QString &name)
Returns time stamp for given file name.
bool accept(QgsStyleEntityVisitorInterface *visitor) const override
Accepts the specified symbology visitor, causing it to visit all symbols associated with the layer.
ContrastEnhancementAlgorithm
This enumerator describes the types of contrast enhancement algorithms that can be used.
virtual void setExtent(const QgsRectangle &rect)
Sets the extent.
@ CumulativeCut
Range is [ min + cumulativeCutLower() * (max - min), min + cumulativeCutUpper() * (max - min) ].
void draw(QPainter *p, QgsRasterViewPort *viewPort, const QgsMapToPixel *qgsMapToPixel, QgsRasterBlockFeedback *feedback=nullptr)
Draws raster data.
QgsHueSaturationFilter::GrayscaleMode grayscaleMode() const
@ MinMax
Real min-max values.
QString encodedSource(const QString &source, const QgsReadWriteContext &context) const override
Called by writeLayerXML(), used by derived classes to encode provider's specific data source to proje...
void draw(QPainter *theQPainter, QgsRasterViewPort *myRasterViewPort, const QgsMapToPixel *qgsMapToPixel=nullptr)
This is an overloaded version of the draw() function that is called by both draw() and thumbnailAsPix...
QgsRasterRenderer * renderer() const
virtual int xSize() const
Gets raster size.
Raster renderer pipe that applies colors to a raster.
void readXml(const QDomElement &filterElem) override
Sets base class members from xml. Usually called from create() methods of subclasses.
int brightness() const
Returns current brightness level.
@ StretchToMinimumMaximum
virtual QgsRasterDataProvider::ProviderCapabilities providerCapabilities() const
Returns flags containing the supported capabilities of the data provider.
QgsCoordinateTransformContext mTransformContext
Coordinate transform context.
void readStyleManager(const QDomNode &layerNode)
Read style manager's configuration (if any). To be called by subclasses.
static Q_INVOKABLE QString toString(QgsUnitTypes::DistanceUnit unit)
Returns a translated string representing a distance unit.
void writeCommonStyle(QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const
Write style data common to all layer types.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
QgsRasterDataProviderTemporalCapabilities * temporalCapabilities() override
Returns the provider's temporal capabilities.
void styleChanged()
Signal emitted whenever a change affects the layer's style.
void repaintRequested(bool deferredUpdate=false)
By emitting this signal the layer tells that either appearance or content have been changed and any v...
int height() const
Returns the height of the (unclipped) raster.
double cumulativeCutLower() const
Returns the lower bound of cumulative cut method (between 0 and 1).
virtual QgsRectangle extent() const
Returns the extent of the layer.
QgsMapLayerTemporalProperties * temporalProperties() override
Returns the layer's temporal properties.
static QPainter::CompositionMode getCompositionMode(QgsPainting::BlendMode blendMode)
Returns a QPainter::CompositionMode corresponding to a BlendMode.
@ ProviderHintBenefitsFromResampling
Provider benefits from resampling and should apply user default resampling settings (since QGIS 3....
const QgsContrastEnhancement * blueContrastEnhancement() const
void setParam(const QString &key, const QString &value)
Sets a generic parameter value on the URI.
QDateTime timestamp() const override
Time stamp of data source in the moment when data/metadata were loaded by provider.
static Limits limitsFromString(const QString &limits)
Deserialize Limits.
static QString limitsString(Limits limits)
Returns a string to serialize Limits.
The drawing pipe for raster layers.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
virtual QString loadDefaultStyle(bool &resultFlag)
Retrieve the default style for this layer if one exists (either as a .qml file on disk or as a record...
@ ReadLayerMetadata
Provider can read layer metadata from data store. Since QGIS 3.0. See QgsDataProvider::layerMetadata(...
QgsRasterDataProvider * dataProvider() override
Returns the source data provider.
Q_DECL_DEPRECATED void setCrs(const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destCRS, int srcDatumTransform=-1, int destDatumTransform=-1)
Sets the source and destination CRS.
QVariantMap decodeUri(const QString &providerKey, const QString &uri)
Breaks a provider data source URI into its component paths (e.g.
static QgsRuntimeProfiler * profiler()
Returns the application runtime profiler.
bool readXml(const QDomNode &layer_node, QgsReadWriteContext &context) override
Called by readLayerXML(), used by children to read state specific to them from project files.
void setClassificationMin(double min)
QgsCoordinateTransformContext transformContext
Coordinate transform context.
QList< QgsRasterRange > QgsRasterRangeList
QString title() const
Returns the title of the layer used by QGIS Server in GetCapabilities request.
Base class for storage of map layer temporal properties.
void setZoomedInResampler(QgsRasterResampler *r)
Sets resampler for zoomed in scales. Takes ownership of the object.
virtual QString subsetString() const
Returns the string (typically sql) used to define a subset of the layer.
QString mDataSource
Data source description string, varies by layer type.
Color and saturation filter pipe for rasters.
void setColorRampItemList(const QList< QgsColorRampShader::ColorRampItem > &list)
Sets a custom colormap.
ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() const
virtual QList< QgsColorRampShader::ColorRampItem > colorTable(int bandNo) const
Renderer for multiband images with the color components.
bool hasScaleBasedVisibility() const
Returns whether scale based visibility is enabled for the layer.
int removeParam(const QString &key)
Removes a generic parameter by key.
@ FullString
Full definition – possibly a very lengthy string, e.g. with no truncation of custom WKT definitions.
Represents a raster layer.
void setContrastEnhancement(QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, QgsRasterMinMaxOrigin::Limits limits=QgsRasterMinMaxOrigin::MinMax, const QgsRectangle &extent=QgsRectangle(), int sampleSize=QgsRasterLayer::SAMPLE_SIZE, bool generateLookupTableFlag=true)
Set contrast enhancement algorithm.
Iterator for sequentially processing raster cells.
@ UInt16
Sixteen bit unsigned integer (quint16)
int contrast() const
Returns current contrast level.
double minimumScale() const
Returns the minimum map scale (i.e.
void rendererChanged()
Signal emitted when renderer is changed.
double maximumScale() const
Returns the maximum map scale (i.e.
This class represents a coordinate reference system (CRS).
virtual bool ignoreExtents() const
Returns true if the extents reported by the data provider are not reliable and it's possible that the...
Manipulates raster pixel values so that they enhanceContrast or clip into a specified numerical range...
virtual int ySize() const
bool readStyle(const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) override
@ UpdatedCanvas
Constantly updated extent of the canvas is used to compute statistics.
QString toString(int precision=16) const
Returns a string representation of form xmin,ymin : xmax,ymax Coordinates will be truncated to the sp...
void setDefaultsFromDataProviderTemporalCapabilities(const QgsDataProviderTemporalCapabilities *capabilities) override
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities...
A class to represent a 2D point.
virtual bool setMaxOversampling(double factor)
Sets maximum oversampling factor for zoomed-out operations.
double minimumValue
The minimum cell value in the raster band.
static QgsMapLayerLegend * defaultRasterLegend(QgsRasterLayer *rl)
Create new legend implementation for raster layer.
double rasterUnitsPerPixelY() const
Returns the number of raster units per each raster pixel in Y axis.
QDateTime timestamp() const override
Time stamp of data source in the moment when data/metadata were loaded by provider.
QgsRasterResampleFilter * resampleFilter() const
Returns the raster's resample filter.
void dataChanged()
Data of layer changed.
void appendError(const QgsErrorMessage &error)
Add error message.
virtual int colorInterpretation(int bandNo) const
Returns data type for the band specified by number.
void reload() override
Synchronises with changes in the datasource.
virtual void setTransformContext(const QgsCoordinateTransformContext &transformContext)
Sets data coordinate transform context to transformContext.
QString publicSource() const
Gets a version of the internal layer definition that has sensitive bits removed (for example,...
QString readPath(const QString &filename) const
Turn filename read from the project file to an absolute path.
Qgis::DataType sourceDataType(int bandNo) const override=0
Returns source data type for the band specified by number, source data type may be shorter than dataT...
QString source() const
Returns the source for the layer.
void setMinMaxOrigin(const QgsRasterMinMaxOrigin &origin)
Sets origin of min/max values.
Setting options for loading raster layers.
QMap< QString, QString > QgsStringMap
bool loadDefaultStyle
Sets to true if the default layer style should be loaded.
@ ARGB32_Premultiplied
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32_Premultiplied.
void writeStyleManager(QDomNode &layerNode, QDomDocument &doc) const
Write style manager's configuration (if exists). To be called by subclasses.
Base class for processing filters like renderers, reprojector, resampler etc.
QgsRasterInterface * last() const
qgssize mHeight
Height, number of rows to be rendered.
virtual QgsRasterRangeList userNoDataValues(int bandNo) const
Returns a list of user no data value ranges.
QgsRasterLayer * clone() const override
Returns a new instance equivalent to this one.
QByteArray encodedUri() const
Returns the complete encoded URI as a byte array.
Q_INVOKABLE QVariant customProperty(const QString &value, const QVariant &defaultValue=QVariant()) const
Read a custom property from layer.
QgsCoordinateTransformContext transformContext() const
Returns the layer data provider coordinate transform context or a default transform context if the la...
virtual void setDataSourceUri(const QString &uri)
Set the data source specification.
Implementation of threaded rendering for raster layers.
QString providerType() const
[ data provider interface ] Which provider is being used for this Raster Layer?
void setEncodedUri(const QByteArray &uri)
Sets the complete encoded uri.
@ StdDev
Range is [ mean - stdDevFactor() * stddev, mean + stdDevFactor() * stddev ].
bool writeXml(QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context) const override
Called by writeLayerXML(), used by children to write state specific to them to project files.
void setResamplingStage(ResamplingStage stage)
Select which stage of the pipe should apply resampling.
qgssize mWidth
Width, number of columns to be rendered.
Brightness/contrast and gamma correction filter pipe for rasters.
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
Perform transforms between map coordinates and device coordinates.
void setName(const QString &name)
Set the display name of the layer.
virtual void legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const
Gets symbology items if provided by renderer.
bool shade(double value, int *returnRedValue, int *returnGreenValue, int *returnBlueValue, int *returnAlphaValue) const override
Generates and new RGB value based on one input value.
QgsRasterPipe * pipe()
Returns the raster pipe.
double width() const SIP_HOLDGIL
Returns the width of the rectangle.
static const QgsContrastEnhancement::ContrastEnhancementAlgorithm MULTIPLE_BAND_MULTI_BYTE_ENHANCEMENT_ALGORITHM
Default enhancement algorithm for multiple band raster of type different from Byte.
static ContrastEnhancementAlgorithm contrastEnhancementAlgorithmFromString(const QString &contrastEnhancementString)
Deserialize ContrastEnhancementAlgorithm.
Base class for all map layer types.
Resample filter pipe for rasters.
virtual QgsRasterInterface * input() const
Current input.
virtual void setUseSourceNoDataValue(int bandNo, bool use)
Sets the source nodata value usage.
void setLimits(QgsRasterMinMaxOrigin::Limits limits)
Sets the limits.
static const QgsRasterMinMaxOrigin::Limits SINGLE_BAND_MIN_MAX_LIMITS
Default enhancement limits for single band raster.
QgsHueSaturationFilter * hueSaturationFilter() const
Returns the raster's hue/saturation filter.
void statusChanged(const QString &) const
Emit a message to be displayed on status bar, usually used by network providers (WMS,...
void refreshRendererIfNeeded(QgsRasterRenderer *rasterRenderer, const QgsRectangle &extent)
Refresh renderer with new extent, if needed.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
@ Int16
Sixteen bit signed integer (qint16)
QList< QPair< QString, QColor > > QgsLegendColorList
Raster values range container.
QgsDataProvider * classFactoryFunction_t(const QString *, const QgsDataProvider::ProviderOptions &options)
QgsBrightnessContrastFilter * brightnessFilter() const
Returns the raster's brightness/contrast filter.
Q_DECL_DEPRECATED void setDataProvider(const QString &provider)
Set the data provider.
@ Int32
Thirty two bit signed integer (qint32)
double stdDev
The standard deviation of the cell values.
static const QgsRasterMinMaxOrigin::Limits MULTIPLE_BAND_SINGLE_BYTE_MIN_MAX_LIMITS
Default enhancement limits for multiple band raster of type Byte.
QgsRasterRenderer * renderer() const
Returns the raster's renderer.
void setExtent(QgsRasterMinMaxOrigin::Extent extent)
Sets the extent.
virtual QString subsetString() const
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
virtual bool setZoomedOutResamplingMethod(ResamplingMethod method)
Set resampling method to apply for zoomed-out operations.
Raster renderer pipe for single band pseudocolor.
@ ARGB32
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32.
virtual QgsLayerMetadata layerMetadata() const
Returns layer metadata collected from the provider's source.
void setSubLayerVisibility(const QString &name, bool vis) override
Set the visibility of the given sublayer name.
bool isSpatial() const override
Returns true if the layer is considered a spatial layer, ie it has some form of geometry associated w...
virtual int bandCount() const =0
Gets number of bands.
QgsRasterProjector * projector() const
void setRasterShaderFunction(QgsRasterShaderFunction *function)
A public method that allows the user to set their own shader function.
static QString identifyFormatName(QgsRaster::IdentifyFormat format)
void setValid(bool valid)
Sets whether layer is valid or not.
@ CurrentCanvas
Current extent of the canvas (at the time of computation) is used to compute statistics.
Interface for all raster shaders.
QgsRasterMinMaxOrigin::Extent extent() const
Returns the raster extent.
QgsCoordinateReferenceSystem mDestCRS
Target coordinate system.
bool writeStyle(QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) const override
QgsRasterShader * shader()
Returns the raster shader.
@ Interpolated
Interpolates the color between two class breaks linearly.
@ Byte
Eight bit unsigned integer (quint8)
@ PaletteIndex
Paletted (see associated color table)
ResamplingStage
Stage at which resampling occurs.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
bool isEmpty() const
Returns true if the rectangle is empty.
virtual QString htmlMetadata()=0
Returns metadata in a format suitable for feeding directly into a subset of the GUI raster properties...
void setProviderType(const QString &providerType)
Sets the providerType (provider key)
virtual int capabilities() const
Returns a bitmask containing the supported capabilities.
QgsMapLayerRenderer * createMapRenderer(QgsRenderContext &rendererContext) override
Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context.
void showStatusMessage(const QString &message)
void setMaxOversampling(double os)
void setPassword(const QString &password)
Sets the password for the URI.
QgsRectangle mDrawnExtent
Intersection of current map extent and layer extent.
Base class for raster data providers.
virtual void setLayerOrder(const QStringList &layers)
Reorder the list of layer names to be rendered by this provider (in order from bottom to top)
QgsRasterMinMaxOrigin::Limits limits() const
Returns the raster limits.
void setLegend(QgsMapLayerLegend *legend)
Assign a legend controller to the map layer.
void setZoomedOutResampler(QgsRasterResampler *r)
Sets resampler for zoomed out scales. Takes ownership of the object.
QgsLayerMetadata metadata
QgsRasterLayer()
Constructor. Provider is not set.
@ Provider
Resampling occurs in Provider.
virtual bool isValid() const =0
Returns true if this is a valid layer.
double cumulativeCutUpper() const
Returns the upper bound of cumulative cut method (between 0 and 1).
@ ContinuousPalette
Continuous palette, QGIS addition, GRASS.
double rasterUnitsPerPixelX() const
Returns the number of raster units per each raster pixel in X axis.
const QgsPathResolver & pathResolver() const
Returns path resolver for conversion between relative and absolute paths.
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate system for the data source.
virtual QgsError error() const
Gets current status error.
@ IdentifyFormatUndefined
void readXml(const QDomElement &filterElem) override
Sets base class members from xml. Usually called from create() methods of subclasses.
@ Float64
Sixty four bit floating point (double)