Class: QgsDatumTransform¶
Contains methods and classes relating the datum transformations.
See also
See also
Static Methods
Returns detailed information about the specified datumTransformId. |
|
Returns a proj string representing the specified datumTransformId datum transform ID. |
|
Returns a list of datum transformations which are available for the given source and destination CRS. |
|
Returns a list of coordinate operations available for transforming coordinates from the source to destination CRS. |
|
Returns the datum transform ID corresponding to a specified proj string. |
- 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¶
Trueif direct download of grid is possible
- fullName: str¶
Full name of transform grid
- isAvailable: bool¶
Trueif grid is currently available for use
- openLicense: bool¶
Trueif grid is available under an open license
- packageName: str¶
Name of package the grid is included within
- shortName: str¶
Short name of transform grid
- url: str¶
Url to download grid from
- 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¶
Area of use, from EPSG registry database
- authority: str¶
Authority name, e.g. EPSG.
- code: str¶
Authority code, e.g. “8447” (for EPSG:8447).
- remarks: str¶
Remarks for operation, from EPSG registry database
- scope: str¶
Scope of operation, from EPSG registry database
- 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¶
Transformation accuracy (in meters)
- areaOfUse: str¶
Area of use string.
This is only available for single step coordinate operations. For multi-step operations, check
operationDetailsinstead.See also
- authority: str¶
Authority name, e.g. EPSG.
This is only available for single step coordinate operations. For multi-step operations, check
operationDetailsinstead.
- bounds: QgsRectangle¶
Valid bounds for the coordinate operation.
See also
- code: str¶
Identification code, e.g. “8447” (For EPSG:8447).
This is only available for single step coordinate operations. For multi-step operations, check
operationDetailsinstead.
- grids: List[QgsDatumTransform.GridDetails]¶
Contains a list of transform grids used by the operation.
- isAvailable: bool¶
Trueif operation is available.If
False, it likely means a transform grid is required which is not available.
- name: str¶
Display name of transform operation
- operationDetails: List[QgsDatumTransform.SingleOperationDetails]¶
Contains information about the single operation steps used in the transform operation.
Note
Only used in builds based on on Proj >= 6.2
Added in version 3.10.
- proj: str¶
Proj representation of transform operation
- remarks: str¶
Remarks for operation, from EPSG registry database.
This is only available for single step coordinate operations. For multi-step operations, check
operationDetailsinstead.
- scope: str¶
Scope of operation, from EPSG registry database.
This is only available for single step coordinate operations. For multi-step operations, check
operationDetailsinstead.
- class TransformInfo¶
Bases:
objectContains datum transform information.
Deprecated since version 3.40: Not used on builds based on Proj >= 6.0.
- datumTransformId: int¶
Datum transform ID
- deprecated: bool¶
True if transform is deprecated
- destinationCrsAuthId: str¶
Destination CRS auth ID
- destinationCrsDescription: str¶
Destination CRS description
- epsgCode: int¶
EPSG code for the transform, or 0 if not found in EPSG database
- preferred: bool¶
True if transform is the preferred transform to use for the source/destination CRS combination
- remarks: str¶
Transform remarks
- scope: str¶
Scope of transform
- sourceCrsAuthId: str¶
Source CRS auth ID
- sourceCrsDescription: str¶
Source CRS description
- class TransformPair¶
Bases:
objectContains datum transform information.
Deprecated since version 3.40: Not used for builds based on Proj >= 6.0.
- destinationTransformId: int¶
ID for the datum transform to use when projecting to the destination CRS.
See also
QgsCoordinateTransform.datumTransformCrsInfo()
- sourceTransformId: int¶
ID for the datum transform to use when projecting from the source CRS.
See also
QgsCoordinateTransform.datumTransformCrsInfo()
- 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