Class: QgsDatumTransform¶
Contains methods and classes relating the datum transformations.
See also
See also
- class qgis.core.QgsDatumTransform[source]¶
Bases:
object- class GridDetails¶
Bases:
objectContains information about a projection transformation grid file.
Added in version 3.8.
- directDownload: bool¶
- fullName: str¶
- isAvailable: bool¶
- openLicense: bool¶
- packageName: str¶
- shortName: str¶
- url: str¶
- class SingleOperationDetails¶
Bases:
objectContains information about a single coordinate operation.
Note
Only used in builds based on on Proj >= 6.2
Added in version 3.10.
- areaOfUse: str¶
- authority: str¶
- code: str¶
- remarks: str¶
- scope: str¶
- class TransformDetails¶
Bases:
objectContains information about a coordinate transformation operation.
Note
Only used in builds based on on Proj >= 6.0
Added in version 3.8.
- accuracy: float¶
- areaOfUse: str¶
- authority: str¶
- bounds: QgsRectangle¶
- code: str¶
- grids: List[QgsDatumTransform.GridDetails]¶
- isAvailable: bool¶
- name: str¶
- operationDetails: List[QgsDatumTransform.SingleOperationDetails]¶
- proj: str¶
- remarks: str¶
- scope: str¶
- class TransformInfo¶
Bases:
objectContains datum transform information.
Deprecated since version 3.40: Not used on builds based on Proj >= 6.0.
- datumTransformId: int¶
- deprecated: bool¶
- destinationCrsAuthId: str¶
- destinationCrsDescription: str¶
- epsgCode: int¶
- preferred: bool¶
- remarks: str¶
- scope: str¶
- sourceCrsAuthId: str¶
- sourceCrsDescription: str¶
- class TransformPair¶
Bases:
objectContains datum transform information.
Deprecated since version 3.40: Not used for builds based on Proj >= 6.0.
- destinationTransformId: int¶
- sourceTransformId: int¶
- static datumTransformInfo(datumTransformId: int) QgsDatumTransform.TransformInfo[source]¶
Returns detailed information about the specified
datumTransformId. IfdatumTransformIdwas not a valid transform ID, a TransformInfo with TransformInfo.datumTransformId of -1 will be returned.See also
See also
Deprecated since version 3.40: Not used for builds based on Proj >= 6.0.
- Parameters:
datumTransformId (int)
- Return type:
- static datumTransformToProj(datumTransformId: int) str[source]¶
Returns a proj string representing the specified
datumTransformIddatum transform ID.See also
See also
See also
Deprecated since version 3.40: Not used for builds based on Proj >= 6.0.
- Parameters:
datumTransformId (int)
- Return type:
str
- static datumTransformations(source: QgsCoordinateReferenceSystem, destination: QgsCoordinateReferenceSystem) List[QgsDatumTransform.TransformPair]¶
Returns a list of datum transformations which are available for the given
sourceanddestinationCRS.See also
See also
Deprecated since version 3.40: Not used for builds based on Proj >= 6.0.
- Parameters:
source (QgsCoordinateReferenceSystem)
destination (QgsCoordinateReferenceSystem)
- Return type:
- static operations(source: QgsCoordinateReferenceSystem, destination: QgsCoordinateReferenceSystem, includeSuperseded: bool = False) List[QgsDatumTransform.TransformDetails]¶
Returns a list of coordinate operations available for transforming coordinates from the
sourcetodestinationCRS.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 shift files which are not available on the local install.
If
includeSupersededisTrue, 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
QgsDatumTransformmust be used instead.Added in version 3.8.
- Parameters:
source (QgsCoordinateReferenceSystem)
destination (QgsCoordinateReferenceSystem)
includeSuperseded (bool = False)
- Return type:
- static projStringToDatumTransformId(string: str | None) int[source]¶
Returns the datum transform ID corresponding to a specified proj
string. Returns -1 if matching datum ID was not found.See also
Deprecated since version 3.40: Not used for builds based on Proj >= 6.0.
- Parameters:
string (Optional[str])
- Return type:
int