QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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.
 
static Q_DECL_DEPRECATED QgsDatumTransform::TransformInfo datumTransformInfo (int datumTransformId)
 Returns detailed information about the specified datumTransformId.
 
static Q_DECL_DEPRECATED QString datumTransformToProj (int datumTransformId)
 Returns a proj string representing the specified datumTransformId datum transform ID.
 
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.
 
static Q_DECL_DEPRECATED int projStringToDatumTransformId (const QString &string)
 Returns the datum transform ID corresponding to a specified proj string.
 
static QgsDatumTransform::TransformDetails transformDetailsFromPj (PJ *op)
 Returns the transform details for a Proj coordinate operation op.
 

Detailed Description

Contains methods and classes relating the datum transformations.

See also
QgsCoordinateTransformContext
QgsCoordinateTransform

Definition at line 41 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:
QGIS 3.40. Not used for builds based on Proj >= 6.0.

Definition at line 65 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:
QGIS 3.40. Not used for builds based on Proj >= 6.0.

Definition at line 262 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:
QGIS 3.40. Not used for builds based on Proj >= 6.0.

Definition at line 154 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 26 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:
QGIS 3.40. Not used for builds based on Proj >= 6.0.

Definition at line 206 of file qgsdatumtransform.cpp.

◆ transformDetailsFromPj()

QgsDatumTransform::TransformDetails QgsDatumTransform::transformDetailsFromPj ( PJ op)
static

Returns the transform details for a Proj coordinate operation op.

Note
Requires Proj 6.0 or later
Since
QGIS 3.8

Definition at line 307 of file qgsdatumtransform.cpp.


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