QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Signals | Public Member Functions | Properties | List of all members
QgsQuickCoordinateTransformer Class Reference

Helper class for transform of coordinates (QgsPoint) to a different coordinate reference system. More...

#include <qgsquickcoordinatetransformer.h>

Inheritance diagram for QgsQuickCoordinateTransformer:
Inheritance graph
[legend]

Signals

void destinationCrsChanged ()
 Destination CRS. More...
 
void projectedPositionChanged ()
 Projected (destination) position (in destination CRS) More...
 
void sourceCrsChanged ()
 Source CRS, default 4326. More...
 
void sourcePositionChanged ()
 Source position (in source CRS) More...
 
void transformContextChanged ()
 Transformation context, can be set from QgsQuickMapSettings::transformContext() More...
 

Public Member Functions

 QgsQuickCoordinateTransformer (QObject *parent=nullptr)
 Creates new coordinate transformer. More...
 
QgsCoordinateReferenceSystem destinationCrs () const
 Destination CRS. More...
 
QgsPoint projectedPosition () const
 Projected (destination) position (in destination CRS) More...
 
void setDestinationCrs (const QgsCoordinateReferenceSystem &destinationCrs)
 Destination CRS. More...
 
void setSourceCrs (const QgsCoordinateReferenceSystem &sourceCrs)
 Source CRS, default 4326. More...
 
void setSourcePosition (const QgsPoint &sourcePosition)
 Source position (in source CRS) More...
 
void setTransformContext (const QgsCoordinateTransformContext &context)
 Transformation context, can be set from QgsQuickMapSettings::transformContext() More...
 
QgsCoordinateReferenceSystem sourceCrs () const
 Source CRS, default 4326. More...
 
QgsPoint sourcePosition () const
 Source position (in source CRS) More...
 
QgsCoordinateTransformContext transformContext () const
 Transformation context, can be set from QgsQuickMapSettings::transformContext() More...
 

Properties

QgsCoordinateReferenceSystem destinationCrs
 Destination CRS. More...
 
QgsPoint projectedPosition
 Projected (destination) position (in destination CRS) More...
 
QgsCoordinateReferenceSystem sourceCrs
 Source CRS, default 4326. More...
 
QgsPoint sourcePosition
 Source position (in source CRS) More...
 
QgsCoordinateTransformContext transformContext
 Transformation context, can be set from QgsQuickMapSettings::transformContext() More...
 

Detailed Description

Helper class for transform of coordinates (QgsPoint) to a different coordinate reference system.

It requires connection of transformation context from mapSettings, source position and source CRS to calculate projected position in desired destination CRS.

Note
QML Type: CoordinateTransformer
Since
QGIS 3.4

Definition at line 39 of file qgsquickcoordinatetransformer.h.

Constructor & Destructor Documentation

QgsQuickCoordinateTransformer::QgsQuickCoordinateTransformer ( QObject *  parent = nullptr)
explicit

Creates new coordinate transformer.

Definition at line 19 of file qgsquickcoordinatetransformer.cpp.

Member Function Documentation

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::destinationCrs ( ) const

Destination CRS.

void QgsQuickCoordinateTransformer::destinationCrsChanged ( )
signal

Destination CRS.

QgsPoint QgsQuickCoordinateTransformer::projectedPosition ( ) const

Projected (destination) position (in destination CRS)

void QgsQuickCoordinateTransformer::projectedPositionChanged ( )
signal

Projected (destination) position (in destination CRS)

void QgsQuickCoordinateTransformer::setDestinationCrs ( const QgsCoordinateReferenceSystem destinationCrs)

Destination CRS.

Definition at line 51 of file qgsquickcoordinatetransformer.cpp.

void QgsQuickCoordinateTransformer::setSourceCrs ( const QgsCoordinateReferenceSystem sourceCrs)

Source CRS, default 4326.

Definition at line 66 of file qgsquickcoordinatetransformer.cpp.

void QgsQuickCoordinateTransformer::setSourcePosition ( const QgsPoint sourcePosition)

Source position (in source CRS)

Definition at line 35 of file qgsquickcoordinatetransformer.cpp.

void QgsQuickCoordinateTransformer::setTransformContext ( const QgsCoordinateTransformContext context)

Transformation context, can be set from QgsQuickMapSettings::transformContext()

Definition at line 77 of file qgsquickcoordinatetransformer.cpp.

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::sourceCrs ( ) const

Source CRS, default 4326.

void QgsQuickCoordinateTransformer::sourceCrsChanged ( )
signal

Source CRS, default 4326.

QgsPoint QgsQuickCoordinateTransformer::sourcePosition ( ) const

Source position (in source CRS)

void QgsQuickCoordinateTransformer::sourcePositionChanged ( )
signal

Source position (in source CRS)

QgsCoordinateTransformContext QgsQuickCoordinateTransformer::transformContext ( ) const

Transformation context, can be set from QgsQuickMapSettings::transformContext()

void QgsQuickCoordinateTransformer::transformContextChanged ( )
signal

Transformation context, can be set from QgsQuickMapSettings::transformContext()

Property Documentation

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::destinationCrs
readwrite

Destination CRS.

Definition at line 50 of file qgsquickcoordinatetransformer.h.

QgsPoint QgsQuickCoordinateTransformer::projectedPosition
read

Projected (destination) position (in destination CRS)

Definition at line 44 of file qgsquickcoordinatetransformer.h.

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::sourceCrs
readwrite

Source CRS, default 4326.

Definition at line 53 of file qgsquickcoordinatetransformer.h.

QgsPoint QgsQuickCoordinateTransformer::sourcePosition
readwrite

Source position (in source CRS)

Definition at line 47 of file qgsquickcoordinatetransformer.h.

QgsCoordinateTransformContext QgsQuickCoordinateTransformer::transformContext
readwrite

Transformation context, can be set from QgsQuickMapSettings::transformContext()

Definition at line 56 of file qgsquickcoordinatetransformer.h.


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