Class: QgsProcessingParameterCoordinateOperation

class qgis.core.QgsProcessingParameterCoordinateOperation(name: str, description: str = '', defaultValue: Any = None, sourceCrsParameterName: str = '', destinationCrsParameterName: str = '', staticSourceCrs: Any = None, staticDestinationCrs: Any = None, optional: bool = False)

Bases: QgsProcessingParameterDefinition

Constructor for QgsProcessingParameterCoordinateOperation.

QgsProcessingParameterCoordinateOperation(QgsProcessingParameterCoordinateOperation)

A coordinate operation parameter for processing algorithms, for selection between available coordinate operations to use when projecting between a source and destination coordinate reference system.

QgsProcessingParameterCoordinateOperation should be evaluated by calling QgsProcessingAlgorithm.parameterAsString()

New in version 3.12.

Parameters
  • name (str) –

  • description (str = '') –

  • defaultValue (Any = None) –

  • sourceCrsParameterName (str = '') –

  • destinationCrsParameterName (str = '') –

  • staticSourceCrs (Any = None) –

  • staticDestinationCrs (Any = None) –

  • optional

asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) → str
Parameters

outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) –

Return type

str

asScriptCode(self) → str
Return type

str

clone(self)QgsProcessingParameterDefinition
Return type

QgsProcessingParameterDefinition

destinationCrs(self) → Any

Returns the static destination CRS, or an invalid value if this is not set.

See also

sourceCrs()

Return type

Any

destinationCrsParameterName(self) → str

Returns the name of the destination CRS parameter, or an empty string if this is not set.

Return type

str

fromScriptCode(name: str, description: str, isOptional: bool, definition: str)QgsProcessingParameterCoordinateOperation

Creates a new parameter using the definition from a script code.

Parameters
  • name (str) –

  • description (str) –

  • isOptional (bool) –

  • definition (str) –

Return type

QgsProcessingParameterCoordinateOperation

fromVariantMap(self, map: Dict[str, Any]) → bool
Parameters

map (Dict[str) –

Return type

bool

setDestinationCrs(self, crs: Any)

Sets the static destination crs.

See also

destinationCrs()

See also

setSourceCrs()

Parameters

crs (Any) –

setDestinationCrsParameterName(self, name: str)

Sets the name of the destination CRS parameter. Use an empty string if this is not required.

Parameters

name (str) –

setSourceCrs(self, crs: Any)

Sets the static source crs.

See also

sourceCrs()

Parameters

crs (Any) –

setSourceCrsParameterName(self, name: str)

Sets the name of the source CRS parameter. Use an empty string if this is not required.

Parameters

name (str) –

sourceCrs(self) → Any

Returns the static source CRS, or an invalid value if this is not set.

See also

setSourceCrs()

See also

destinationCrs()

Return type

Any

sourceCrsParameterName(self) → str

Returns the name of the source CRS parameter, or an empty string if this is not set.

Return type

str

toVariantMap(self) → Dict[str, Any]
Return type

Dict[str, Any]

type(self) → str
Return type

str

typeName() → str

Returns the type name for the parameter class.

Return type

str

valueAsPythonString(self, value: Any, context: QgsProcessingContext) → str
Parameters
Return type

str