@@ -491,36 +491,85 @@ be evaluated once for every input feature processed.
491
491
static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
492
492
%Docstring
493
493
Evaluates the parameter with matching ``definition`` to a static string value.
494
+ %End
495
+
496
+ static QString parameterAsString( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
497
+ %Docstring
498
+ Evaluates the parameter with matching ``definition`` and ``value`` to a static string value.
499
+
500
+ .. versionadded:: 3.4
494
501
%End
495
502
496
503
static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
497
504
%Docstring
498
505
Evaluates the parameter with matching ``definition`` to an expression.
506
+ %End
507
+
508
+ static QString parameterAsExpression( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
509
+ %Docstring
510
+ Evaluates the parameter with matching ``definitionand`` ``value`` to an expression.
511
+
512
+ .. versionadded:: 3.4
499
513
%End
500
514
501
515
static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
502
516
%Docstring
503
517
Evaluates the parameter with matching ``definition`` to a static double value.
518
+ %End
519
+
520
+ static double parameterAsDouble( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
521
+ %Docstring
522
+ Evaluates the parameter with matching ``definition`` and ``value`` to a static double value.
523
+
524
+ .. versionadded:: 3.4
504
525
%End
505
526
506
527
static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
507
528
%Docstring
508
529
Evaluates the parameter with matching ``definition`` to a static integer value.
530
+ %End
531
+
532
+ static int parameterAsInt( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
533
+ %Docstring
534
+ Evaluates the parameter with matching ``definition`` and ``value`` to a static integer value.
535
+
536
+ .. versionadded:: 3.4
509
537
%End
510
538
511
539
static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
512
540
%Docstring
513
541
Evaluates the parameter with matching ``definition`` to a enum value.
542
+ %End
543
+
544
+ static int parameterAsEnum( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
545
+ %Docstring
546
+ Evaluates the parameter with matching ``definition`` and ``value`` to a enum value.
547
+
548
+ .. versionadded:: 3.4
514
549
%End
515
550
516
551
static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
517
552
%Docstring
518
553
Evaluates the parameter with matching ``definition`` to list of enum values.
554
+ %End
555
+
556
+ static QList<int> parameterAsEnums( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
557
+ %Docstring
558
+ Evaluates the parameter with matching ``definition`` and ``value`` to list of enum values.
559
+
560
+ .. versionadded:: 3.4
519
561
%End
520
562
521
563
static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context );
522
564
%Docstring
523
565
Evaluates the parameter with matching ``definition`` to a static boolean value.
566
+ %End
567
+
568
+ static bool parameterAsBool( const QgsProcessingParameterDefinition *definition, const QVariant &value, const QgsProcessingContext &context );
569
+ %Docstring
570
+ Evaluates the parameter with matching ``definition`` and ``value`` to a static boolean value.
571
+
572
+ .. versionadded:: 3.4
524
573
%End
525
574
526
575
static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters,
@@ -538,6 +587,25 @@ argument will be set to a string which can be used to retrieve the layer corresp
538
587
to the sink, e.g. via calling :py:func:`QgsProcessingUtils.mapLayerFromString()`
539
588
540
589
This function creates a new object and the caller takes responsibility for deleting the returned object.
590
+ %End
591
+
592
+ static QgsFeatureSink *parameterAsSink( const QgsProcessingParameterDefinition *definition, const QVariant &value,
593
+ const QgsFields &fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem &crs,
594
+ QgsProcessingContext &context, QString &destinationIdentifier /Out/ ) /Factory/;
595
+ %Docstring
596
+ Evaluates the parameter with matching ``definition`` and ``value`` to a feature sink.
597
+
598
+ The ``fields``, ``geometryType`` and ``crs`` parameters dictate the properties
599
+ of the resulting feature sink.
600
+
601
+ Sinks will either be taken from ``context``'s active project, or created from external
602
+ providers and stored temporarily in the ``context``. The ``destinationIdentifier``
603
+ argument will be set to a string which can be used to retrieve the layer corresponding
604
+ to the sink, e.g. via calling :py:func:`QgsProcessingUtils.mapLayerFromString()`
605
+
606
+ This function creates a new object and the caller takes responsibility for deleting the returned object.
607
+
608
+ .. versionadded:: 3.4
541
609
%End
542
610
543
611
static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context ) /Factory/;
@@ -548,6 +616,18 @@ Sources will either be taken from ``context``'s active project, or loaded from e
548
616
sources and stored temporarily in the ``context``.
549
617
550
618
This function creates a new object and the caller takes responsibility for deleting the returned object.
619
+ %End
620
+
621
+ static QgsProcessingFeatureSource *parameterAsSource( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context ) /Factory/;
622
+ %Docstring
623
+ Evaluates the parameter with matching ``definition`` and ``value`` to a feature source.
624
+
625
+ Sources will either be taken from ``context``'s active project, or loaded from external
626
+ sources and stored temporarily in the ``context``.
627
+
628
+ This function creates a new object and the caller takes responsibility for deleting the returned object.
629
+
630
+ .. versionadded:: 3.4
551
631
%End
552
632
553
633
static QString parameterAsCompatibleSourceLayerPath( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters,
@@ -572,6 +652,17 @@ Evaluates the parameter with matching ``definition`` to a map layer.
572
652
Layers will either be taken from ``context``'s active project, or loaded from external
573
653
sources and stored temporarily in the ``context``. In either case, callers do not
574
654
need to handle deletion of the returned layer.
655
+ %End
656
+
657
+ static QgsMapLayer *parameterAsLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
658
+ %Docstring
659
+ Evaluates the parameter with matching ``definition`` and ``value`` to a map layer.
660
+
661
+ Layers will either be taken from ``context``'s active project, or loaded from external
662
+ sources and stored temporarily in the ``context``. In either case, callers do not
663
+ need to handle deletion of the returned layer.
664
+
665
+ .. versionadded:: 3.4
575
666
%End
576
667
577
668
static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
@@ -581,16 +672,41 @@ Evaluates the parameter with matching ``definition`` to a raster layer.
581
672
Layers will either be taken from ``context``'s active project, or loaded from external
582
673
sources and stored temporarily in the ``context``. In either case, callers do not
583
674
need to handle deletion of the returned layer.
675
+ %End
676
+
677
+ static QgsRasterLayer *parameterAsRasterLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
678
+ %Docstring
679
+ Evaluates the parameter with matching ``definition`` and ``value`` to a raster layer.
680
+
681
+ Layers will either be taken from ``context``'s active project, or loaded from external
682
+ sources and stored temporarily in the ``context``. In either case, callers do not
683
+ need to handle deletion of the returned layer.
684
+
685
+ .. versionadded:: 3.4
584
686
%End
585
687
586
688
static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
587
689
%Docstring
588
690
Evaluates the parameter with matching ``definition`` to a output layer destination.
691
+ %End
692
+
693
+ static QString parameterAsOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
694
+ %Docstring
695
+ Evaluates the parameter with matching ``definition`` and ``value`` to a output layer destination.
696
+
697
+ .. versionadded:: 3.4
589
698
%End
590
699
591
700
static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
592
701
%Docstring
593
702
Evaluates the parameter with matching ``definition`` to a file based output destination.
703
+ %End
704
+
705
+ static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
706
+ %Docstring
707
+ Evaluates the parameter with matching ``definition`` and ``value`` to a file based output destination.
708
+
709
+ .. versionadded:: 3.4
594
710
%End
595
711
596
712
static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
@@ -600,11 +716,29 @@ Evaluates the parameter with matching ``definition`` to a vector layer.
600
716
Layers will either be taken from ``context``'s active project, or loaded from external
601
717
sources and stored temporarily in the ``context``. In either case, callers do not
602
718
need to handle deletion of the returned layer.
719
+ %End
720
+
721
+ static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
722
+ %Docstring
723
+ Evaluates the parameter with matching ``definition`` and ``value`` to a vector layer.
724
+
725
+ Layers will either be taken from ``context``'s active project, or loaded from external
726
+ sources and stored temporarily in the ``context``. In either case, callers do not
727
+ need to handle deletion of the returned layer.
728
+
729
+ .. versionadded:: 3.4
603
730
%End
604
731
605
732
static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
606
733
%Docstring
607
734
Evaluates the parameter with matching ``definition`` to a coordinate reference system.
735
+ %End
736
+
737
+ static QgsCoordinateReferenceSystem parameterAsCrs( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
738
+ %Docstring
739
+ Evaluates the parameter with matching ``definition`` and ``value`` to a coordinate reference system.
740
+
741
+ .. versionadded:: 3.4
608
742
%End
609
743
610
744
static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context,
@@ -618,6 +752,21 @@ reprojected so that it is in the specified ``crs``. In this case the extent of t
618
752
.. seealso:: :py:func:`parameterAsExtentGeometry`
619
753
620
754
.. seealso:: :py:func:`parameterAsExtentCrs`
755
+ %End
756
+
757
+ static QgsRectangle parameterAsExtent( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context,
758
+ const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
759
+ %Docstring
760
+ Evaluates the parameter with matching ``definition`` and ``value`` to a rectangular extent.
761
+
762
+ If ``crs`` is set, and the original coordinate reference system of the parameter can be determined, then the extent will be automatically
763
+ reprojected so that it is in the specified ``crs``. In this case the extent of the reproject rectangle will be returned.
764
+
765
+ .. seealso:: :py:func:`parameterAsExtentGeometry`
766
+
767
+ .. seealso:: :py:func:`parameterAsExtentCrs`
768
+
769
+ .. versionadded:: 3.4
621
770
%End
622
771
623
772
static QgsGeometry parameterAsExtentGeometry( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context,
@@ -650,6 +799,18 @@ Evaluates the parameter with matching ``definition`` to a point.
650
799
If ``crs`` is set then the point will be automatically reprojected so that it is in the specified ``crs``.
651
800
652
801
.. seealso:: :py:func:`parameterAsPointCrs`
802
+ %End
803
+
804
+ static QgsPointXY parameterAsPoint( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context,
805
+ const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
806
+ %Docstring
807
+ Evaluates the parameter with matching ``definition`` and ``value`` to a point.
808
+
809
+ If ``crs`` is set then the point will be automatically reprojected so that it is in the specified ``crs``.
810
+
811
+ .. seealso:: :py:func:`parameterAsPointCrs`
812
+
813
+ .. versionadded:: 3.4
653
814
%End
654
815
655
816
static QgsCoordinateReferenceSystem parameterAsPointCrs( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
@@ -662,27 +823,63 @@ Returns the coordinate reference system associated with an point parameter value
662
823
static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
663
824
%Docstring
664
825
Evaluates the parameter with matching ``definition`` to a file/folder name.
826
+ %End
827
+
828
+ static QString parameterAsFile( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
829
+ %Docstring
830
+ Evaluates the parameter with matching ``definition`` and ``value`` to a file/folder name.
831
+
832
+ .. versionadded:: 3.4
665
833
%End
666
834
667
835
static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
668
836
%Docstring
669
837
Evaluates the parameter with matching ``definition`` to a matrix/table of values.
670
838
Tables are collapsed to a 1 dimensional list.
839
+ %End
840
+
841
+ static QVariantList parameterAsMatrix( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
842
+ %Docstring
843
+ Evaluates the parameter with matching ``definition`` and ``value`` to a matrix/table of values.
844
+ Tables are collapsed to a 1 dimensional list.
845
+
846
+ .. versionadded:: 3.4
671
847
%End
672
848
673
849
static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
674
850
%Docstring
675
851
Evaluates the parameter with matching ``definition`` to a list of map layers.
852
+ %End
853
+
854
+ static QList< QgsMapLayer *> parameterAsLayerList( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
855
+ %Docstring
856
+ Evaluates the parameter with matching ``definition`` and ``value`` to a list of map layers.
857
+
858
+ .. versionadded:: 3.4
676
859
%End
677
860
678
861
static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
679
862
%Docstring
680
863
Evaluates the parameter with matching ``definition`` to a range of values.
864
+ %End
865
+
866
+ static QList<double> parameterAsRange( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
867
+ %Docstring
868
+ Evaluates the parameter with matching ``definition`` and ``value`` to a range of values.
869
+
870
+ .. versionadded:: 3.4
681
871
%End
682
872
683
873
static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context );
684
874
%Docstring
685
875
Evaluates the parameter with matching ``definition`` to a list of fields.
876
+ %End
877
+
878
+ static QStringList parameterAsFields( const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context );
879
+ %Docstring
880
+ Evaluates the parameter with matching ``definition`` and ``value`` to a list of fields.
881
+
882
+ .. versionadded:: 3.4
686
883
%End
687
884
688
885
static QgsProcessingParameterDefinition *parameterFromVariantMap( const QVariantMap &map ) /Factory/;
0 commit comments