Class: QgsProcessingParameterCoordinateOperation

A coordinate operation parameter for processing algorithms.

This parameter allows 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().

Added in version 3.12.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterCoordinateOperation

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

class qgis.core.QgsProcessingParameterCoordinateOperation[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None = '', defaultValue: Any = None, sourceCrsParameterName: str | None = '', destinationCrsParameterName: str | None = '', staticSourceCrs: Any = None, staticDestinationCrs: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterCoordinateOperation.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • defaultValue (Any = None)

  • sourceCrsParameterName (Optional[str] = '')

  • destinationCrsParameterName (Optional[str] = '')

  • staticSourceCrs (Any = None)

  • staticDestinationCrs (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterCoordinateOperation)
Parameters:

a0 (QgsProcessingParameterCoordinateOperation)

destinationCrs(self) Any[source]

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

See also

sourceCrs()

Return type:

Any

destinationCrsParameterName(self) str[source]

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

Return type:

str

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterCoordinateOperation | None[source]

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

Parameters:
  • name (Optional[str])

  • description (Optional[str])

  • isOptional (bool)

  • definition (Optional[str])

Return type:

Optional[QgsProcessingParameterCoordinateOperation]

setDestinationCrs(self, crs: Any)[source]

Sets the static destination crs.

See also

destinationCrs()

See also

setSourceCrs()

Parameters:

crs (Any)

setDestinationCrsParameterName(self, name: str | None)[source]

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

Parameters:

name (Optional[str])

setSourceCrs(self, crs: Any)[source]

Sets the static source crs.

See also

sourceCrs()

Parameters:

crs (Any)

setSourceCrsParameterName(self, name: str | None)[source]

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

Parameters:

name (Optional[str])

sourceCrs(self) Any[source]

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[source]

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

Return type:

str

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str