Class: QgsProcessingFeatureSource¶
-
class
qgis.core.
QgsProcessingFeatureSource
(originalSource: QgsFeatureSource, context: QgsProcessingContext, ownsOriginalSource: bool = False)¶ Bases:
QgsFeatureSource
Constructor for
QgsProcessingFeatureSource
, accepting an original feature sourceoriginalSource
and processingcontext
. Ownership oforiginalSource
is dictated byownsOriginalSource
. IfownsOriginalSource
is false, ownership is not transferred, and callers must ensure thatoriginalSource
exists for the lifetime of this object. IfownsOriginalSource
is true, then this object will take ownership oforiginalSource
.QgsProcessingFeatureSource(
QgsProcessingFeatureSource
)QgsFeatureSource
subclass which proxies methods to an underlyingQgsFeatureSource
, modifying results according to the settings in aQgsProcessingContext
.New in version 3.0.
- Parameters
originalSource (QgsFeatureSource) –
context (QgsProcessingContext) –
ownsOriginalSource –
-
class
Flag
¶ Bases:
int
-
FlagSkipGeometryValidityChecks
= 2¶
-
class
Flags
¶ Bases:
sip.wrapper
QgsProcessingFeatureSource.Flags(Union[QgsProcessingFeatureSource.Flags, QgsProcessingFeatureSource.Flag]) QgsProcessingFeatureSource.Flags(QgsProcessingFeatureSource.Flags)
-
allFeatureIds
(self) → object¶ - Return type
object
-
createExpressionContextScope
(self) → QgsExpressionContextScope¶ Returns an expression context scope suitable for this source.
- Return type
-
featureCount
(self) → int¶ - Return type
int
-
getFeatures
(self, request: QgsFeatureRequest, flags: Union[QgsProcessingFeatureSource.Flags, QgsProcessingFeatureSource.Flag]) → QgsFeatureIterator¶ Returns an iterator for the features in the source, respecting the supplied feature
flags
. An optionalrequest
can be used to optimise the returned iterator, eg by restricting the returned attributes or geometry.getFeatures(self, request:
QgsFeatureRequest
= QgsFeatureRequest()) -> QgsFeatureIterator- Parameters
request (QgsFeatureRequest) –
flags (Union[QgsProcessingFeatureSource.Flags) –
- Return type
-
hasFeatures
(self) → QgsFeatureSource.FeatureAvailability¶ - Return type
-
maximumValue
(self, fieldIndex: int) → Any¶ - Parameters
fieldIndex (int) –
- Return type
Any
-
minimumValue
(self, fieldIndex: int) → Any¶ - Parameters
fieldIndex (int) –
- Return type
Any
-
sourceCrs
(self) → QgsCoordinateReferenceSystem¶ - Return type
-
sourceExtent
(self) → QgsRectangle¶ - Return type
-
sourceName
(self) → str¶ - Return type
str
-
uniqueValues
(self, fieldIndex: int, limit: int = -1) → Set[Any]¶ - Parameters
fieldIndex (int) –
limit (int = -1) –
- Return type
Set[Any]
-
wkbType
(self) → QgsWkbTypes.Type¶ - Return type