QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
Classes | Static Public Member Functions | List of all members
QgsDatumTransform Class Reference

Contains methods and classes relating the datum transformations. More...

#include <qgsdatumtransform.h>

Classes

struct  GridDetails
 Contains information about a projection transformation grid file. More...
 
struct  SingleOperationDetails
 Contains information about a single coordinate operation. More...
 
struct  TransformDetails
 Contains information about a coordinate transformation operation. More...
 
struct  TransformInfo
 Contains datum transform information. More...
 
struct  TransformPair
 Contains datum transform information. More...
 

Static Public Member Functions

static Q_DECL_DEPRECATED QList< QgsDatumTransform::TransformPairdatumTransformations (const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination)
 Returns a list of datum transformations which are available for the given source and destination CRS. More...
 
static Q_DECL_DEPRECATED QgsDatumTransform::TransformInfo datumTransformInfo (int datumTransformId)
 Returns detailed information about the specified datumTransformId. More...
 
static Q_DECL_DEPRECATED QString datumTransformToProj (int datumTransformId)
 Returns a proj string representing the specified datumTransformId datum transform ID. More...
 
static QList< QgsDatumTransform::TransformDetailsoperations (const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, bool includeSuperseded=false)
 Returns a list of coordinate operations available for transforming coordinates from the source to destination CRS. More...
 
static Q_DECL_DEPRECATED int projStringToDatumTransformId (const QString &string)
 Returns the datum transform ID corresponding to a specified proj string. More...
 

Detailed Description

Contains methods and classes relating the datum transformations.

See also
QgsCoordinateTransformContext
QgsCoordinateTransform
Since
QGIS 3.0

Definition at line 44 of file qgsdatumtransform.h.

Member Function Documentation

◆ datumTransformations()

QList< QgsDatumTransform::TransformPair > QgsDatumTransform::datumTransformations ( const QgsCoordinateReferenceSystem source,
const QgsCoordinateReferenceSystem destination 
)
static

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

See also
datumTransformToProj()
datumTransformInfo()
Deprecated:
Not used for builds based on Proj >= 6.0

Definition at line 73 of file qgsdatumtransform.cpp.

◆ datumTransformInfo()

QgsDatumTransform::TransformInfo QgsDatumTransform::datumTransformInfo ( int  datumTransformId)
static

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.

See also
datumTransformations()
datumTransformToProj()
Deprecated:
Not used for builds based on Proj >= 6.0

Definition at line 270 of file qgsdatumtransform.cpp.

◆ datumTransformToProj()

QString QgsDatumTransform::datumTransformToProj ( int  datumTransformId)
static

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

See also
datumTransformations()
datumTransformInfo()
projStringToDatumTransformId()
Deprecated:
Not used for builds based on Proj >= 6.0

Definition at line 162 of file qgsdatumtransform.cpp.

◆ operations()

QList< QgsDatumTransform::TransformDetails > QgsDatumTransform::operations ( const QgsCoordinateReferenceSystem source,
const QgsCoordinateReferenceSystem destination,
bool  includeSuperseded = false 
)
static

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 shift 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.
Since
QGIS 3.8

Definition at line 28 of file qgsdatumtransform.cpp.

◆ projStringToDatumTransformId()

int QgsDatumTransform::projStringToDatumTransformId ( const QString &  string)
static

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

Returns -1 if matching datum ID was not found.

See also
datumTransformToProj()
Deprecated:
Not used for builds based on Proj >= 6.0

Definition at line 214 of file qgsdatumtransform.cpp.


The documentation for this class was generated from the following files: