Class: QgsDatumTransform

class qgis.core.QgsDatumTransform

Bases: sip.wrapper

Contains methods and classes relating the datum transformations.

New in version 3.0: Enums

Methods

datumTransformInfo

Returns detailed information about the specified datumTransformId.

datumTransformToProj

Returns a proj string representing the specified datumTransformId datum transform ID.

datumTransformations

Returns a list of datum transformations which are available for the given source and destination CRS.

operations

Returns a list of coordinate operations available for transforming coordinates from the source to destination CRS.

projStringToDatumTransformId

Returns the datum transform ID corresponding to a specified proj string.

Signals

Attributes

class GridDetails

Bases: sip.wrapper

QgsDatumTransform.GridDetails(QgsDatumTransform.GridDetails)

directDownload
fullName
isAvailable
openLicense
packageName
shortName
url
class SingleOperationDetails

Bases: sip.wrapper

QgsDatumTransform.SingleOperationDetails(QgsDatumTransform.SingleOperationDetails)

areaOfUse
authority
code
remarks
scope
class TransformDetails

Bases: sip.wrapper

QgsDatumTransform.TransformDetails(QgsDatumTransform.TransformDetails)

accuracy
areaOfUse
authority
bounds
code
grids
isAvailable
name
operationDetails
proj
remarks
scope
class TransformInfo

Bases: sip.wrapper

QgsDatumTransform.TransformInfo(QgsDatumTransform.TransformInfo)

datumTransformId
deprecated
destinationCrsAuthId
destinationCrsDescription
epsgCode
preferred
remarks
scope
sourceCrsAuthId
sourceCrsDescription
class TransformPair(sourceTransformId: int = -1, destinationTransformId: int = -1)

Bases: sip.wrapper

Constructor for a TransformPair with the specified sourceTransformId and destinationTransformId transforms.

QgsDatumTransform.TransformPair(QgsDatumTransform.TransformPair)

destinationTransformId
sourceTransformId
datumTransformInfo(datumTransformId: int) → QgsDatumTransform.TransformInfo

Returns detailed information about the specified datumTransformId. If datumTransformId was not a valid transform ID, a TransformInfo with TransformInfo.datumTransformId of -1 will be returned.

Deprecated since version Not: used for builds based on Proj >= 6.0

datumTransformToProj(datumTransformId: int) → str

Returns a proj string representing the specified datumTransformId datum transform ID.

Deprecated since version Not: used for builds based on Proj >= 6.0

datumTransformations(source: QgsCoordinateReferenceSystem, destination: QgsCoordinateReferenceSystem) → List[QgsDatumTransform.TransformPair]

Returns a list of datum transformations which are available for the given source and destination CRS.

Deprecated since version Not: used for builds based on Proj >= 6.0

operations(source: QgsCoordinateReferenceSystem, destination: QgsCoordinateReferenceSystem, includeSuperseded: bool = False) → List[QgsDatumTransform.TransformDetails]

Returns a list of coordinate operations available for transforming coordinates from the source to destination CRS.

This list is sorted in order of preference, with the most preferable operation listed first.

Not all operations may be available for use. Check QgsDatumTransform.TransformDetails.isAvailable first. Operations may require grid transformation files which are not available on the local install.

If includeSuperseded is True, superseded (but not deprecated) transforms will be included in the results. This requires Proj >= 6.2.

Note

Requires Proj 6.0 or later. Builds based on earlier Proj versions will always return an empty list, and the deprecated API from QgsDatumTransform must be used instead.

New in version 3.8.

projStringToDatumTransformId(string: str) → int

Returns the datum transform ID corresponding to a specified proj string. Returns -1 if matching datum ID was not found.

Deprecated since version Not: used for builds based on Proj >= 6.0