72 static QList< QgsRasterLayer * > compatibleRasterLayers(
QgsProject *project,
bool sort =
true );
94 static QList< QgsVectorLayer * > compatibleVectorLayers(
QgsProject *project,
95 const QList< int > &sourceTypes = QList< int >(),
116 static QList<QgsMeshLayer *> compatibleMeshLayers(
QgsProject *project,
bool sort =
true );
136 static QList<QgsPluginLayer *> compatiblePluginLayers(
QgsProject *project,
bool sort =
true );
156 static QList<QgsPointCloudLayer *> compatiblePointCloudLayers(
QgsProject *project,
bool sort =
true );
176 static QList<QgsAnnotationLayer *> compatibleAnnotationLayers(
QgsProject *project,
bool sort =
true );
196 static QList<QgsVectorTileLayer *> compatibleVectorTileLayers(
QgsProject *project,
bool sort =
true );
216 static QList<QgsTiledSceneLayer *> compatibleTiledSceneLayers(
QgsProject *project,
bool sort =
true );
227 static QList< QgsMapLayer * > compatibleLayers(
QgsProject *project,
bool sort =
true );
235 static QString encodeProviderKeyAndUri(
const QString &providerKey,
const QString &uri );
248 static bool decodeProviderKeyAndUri(
const QString &
string, QString &providerKey
SIP_OUT, QString &uri
SIP_OUT );
307 static QString normalizeLayerSource( const QString &source );
315 static QString variantToPythonLiteral( const QVariant &value );
322 static QString stringToPythonLiteral( const QString &
string );
347 const QVariantMap &createOptions = QVariantMap(),
348 const QStringList &datasourceOptions = QStringList(),
349 const QStringList &layerOptions = QStringList(),
350 QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
397 static QVariant generateIteratingDestination( const QVariant &input, const QVariant &
id,
QgsProcessingContext &context );
411 static QString generateTempFilename( const QString &basename, const
QgsProcessingContext *context =
nullptr );
441 static QString convertToCompatibleFormat( const
QgsVectorLayer *layer,
442 bool selectedFeaturesOnly,
443 const QString &baseName,
444 const QStringList &compatibleFormats,
445 const QString &preferredFormat,
448 long long featureLimit = -1,
449 const QString &filterExpression = QString() );
485 static QString convertToCompatibleFormatAndLayerName( const
QgsVectorLayer *layer,
486 bool selectedFeaturesOnly,
487 const QString &baseName,
488 const QStringList &compatibleFormats,
489 const QString &preferredFormat,
493 long long featureLimit = -1,
494 const QString &filterExpression = QString() );
513 static QList<
int> fieldNamesToIndices( const QStringList &fieldNames, const
QgsFields &fields );
519 static
QgsFields indicesToFields( const QList<
int> &indices, const
QgsFields &fields );
533 static QString defaultVectorExtension();
547 static QString defaultRasterExtension();
560 static QString defaultPointCloudExtension();
573 static QString defaultVectorTileExtension();
581 static QVariantMap removePointerValuesFromMap( const QVariantMap &map );
590 static QVariantMap preprocessQgisProcessParameters( const QVariantMap ¶meters,
bool &ok, QString &error );
600 static QString resolveDefaultEncoding( const QString &defaultEncoding = "System" );
611 const QList<
int > &sourceTypes = QList<
int >() );
625 template< typename T> static QList< T * > compatibleMapLayers(
QgsProject *project,
bool sort = true );
659 Q_DECL_DEPRECATED static
QgsMapLayer *loadMapLayerFromString( const QString &
string, LayerHint typeHint = LayerHint::UnknownType )
SIP_DEPRECATED ;
661 static
void parseDestinationString( QString &destination, QString &providerKey, QString &uri, QString &layerName, QString &format, QMap<QString, QVariant> &options,
bool &useWriter, QString &extension );
663 friend class TestQgsProcessing;
682 FlagSkipGeometryValidityChecks = 1 << 1,
684 Q_DECLARE_FLAGS( Flags, Flag )
699 long long featureLimit = -1,
const QString &filterExpression = QString() );
716 long long featureCount()
const override;
717 QString sourceName()
const override;
718 QSet<QVariant> uniqueValues(
int fieldIndex,
int limit = -1 )
const override;
719 QVariant minimumValue(
int fieldIndex )
const override;
720 QVariant maximumValue(
int fieldIndex )
const override;
723 SpatialIndexPresence hasSpatialIndex()
const override;
740 bool mOwnsSource = false;
743 Qgis::WkbType mSourceWkbType =
Qgis::WkbType::Unknown;
749 std::function<
void( const
QgsFeature & ) > mInvalidGeometryCallback;
750 std::function<
void( const
QgsFeature & ) > mTransformErrorCallback;
752 std::function<
void( const
QgsFeature & ) > mInvalidGeometryCallbackSkip;
753 std::function<
void( const
QgsFeature & ) > mInvalidGeometryCallbackAbort;
755 long long mFeatureLimit = -1;
756 QString mFilterExpression;
Single scope for storing variables and functions for use within a QgsExpressionContext.
Contains information about the context in which a processing algorithm is executed.