Class: QgsProcessingParameterCoordinateOperation

class qgis.core.QgsProcessingParameterCoordinateOperation

Bases: QgsProcessingParameterDefinition

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.

QgsProcessingParameterCoordinateOperation(name: str, description: str = ‘’, defaultValue: Any = None, sourceCrsParameterName: str = ‘’, destinationCrsParameterName: str = ‘’, staticSourceCrs: Any = None, staticDestinationCrs: Any = None, optional: bool = False) Constructor for QgsProcessingParameterCoordinateOperation.

QgsProcessingParameterCoordinateOperation(QgsProcessingParameterCoordinateOperation)

Methods

asPythonString

param outputType

asScriptCode

rtype

str

clone

rtype

QgsProcessingParameterDefinition

dependsOnOtherParameters

rtype

List[str]

destinationCrs

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

destinationCrsParameterName

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

fromScriptCode

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

fromVariantMap

param map

setDestinationCrs

Sets the static destination crs.

setDestinationCrsParameterName

Sets the name of the destination CRS parameter.

setSourceCrs

Sets the static source crs.

setSourceCrsParameterName

Sets the name of the source CRS parameter.

sourceCrs

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

sourceCrsParameterName

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

toVariantMap

rtype

Dict[str, Any]

type

rtype

str

typeName

Returns the type name for the parameter class.

valueAsPythonString

param value

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

dependsOnOtherParameters(self)List[str]
Return type

List[str]

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