QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
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.
 
void projectedPositionChanged ()
 Projected (destination) position (in destination CRS)
 
void sourceCrsChanged ()
 Source CRS, default 4326.
 
void sourcePositionChanged ()
 Source position (in source CRS)
 
void transformContextChanged ()
 Transformation context, can be set from QgsQuickMapSettings::transformContext()
 

Public Member Functions

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

Properties

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

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 40 of file qgsquickcoordinatetransformer.h.

Constructor & Destructor Documentation

◆ QgsQuickCoordinateTransformer()

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

Creates new coordinate transformer.

Definition at line 20 of file qgsquickcoordinatetransformer.cpp.

Member Function Documentation

◆ destinationCrs()

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::destinationCrs ( ) const

Destination CRS.

Definition at line 47 of file qgsquickcoordinatetransformer.cpp.

◆ destinationCrsChanged

void QgsQuickCoordinateTransformer::destinationCrsChanged ( )
signal

Destination CRS.

◆ projectedPosition()

QgsPoint QgsQuickCoordinateTransformer::projectedPosition ( ) const

Projected (destination) position (in destination CRS)

Definition at line 26 of file qgsquickcoordinatetransformer.cpp.

◆ projectedPositionChanged

void QgsQuickCoordinateTransformer::projectedPositionChanged ( )
signal

Projected (destination) position (in destination CRS)

◆ setDestinationCrs()

void QgsQuickCoordinateTransformer::setDestinationCrs ( const QgsCoordinateReferenceSystem destinationCrs)

Destination CRS.

Definition at line 52 of file qgsquickcoordinatetransformer.cpp.

◆ setSourceCrs()

void QgsQuickCoordinateTransformer::setSourceCrs ( const QgsCoordinateReferenceSystem sourceCrs)

Source CRS, default 4326.

Definition at line 67 of file qgsquickcoordinatetransformer.cpp.

◆ setSourcePosition()

void QgsQuickCoordinateTransformer::setSourcePosition ( const QgsPoint sourcePosition)

Source position (in source CRS)

Definition at line 36 of file qgsquickcoordinatetransformer.cpp.

◆ setTransformContext()

void QgsQuickCoordinateTransformer::setTransformContext ( const QgsCoordinateTransformContext context)

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

Definition at line 78 of file qgsquickcoordinatetransformer.cpp.

◆ sourceCrs()

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::sourceCrs ( ) const

Source CRS, default 4326.

Definition at line 62 of file qgsquickcoordinatetransformer.cpp.

◆ sourceCrsChanged

void QgsQuickCoordinateTransformer::sourceCrsChanged ( )
signal

Source CRS, default 4326.

◆ sourcePosition()

QgsPoint QgsQuickCoordinateTransformer::sourcePosition ( ) const

Source position (in source CRS)

Definition at line 31 of file qgsquickcoordinatetransformer.cpp.

◆ sourcePositionChanged

void QgsQuickCoordinateTransformer::sourcePositionChanged ( )
signal

Source position (in source CRS)

◆ transformContext()

QgsCoordinateTransformContext QgsQuickCoordinateTransformer::transformContext ( ) const

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

Definition at line 84 of file qgsquickcoordinatetransformer.cpp.

◆ transformContextChanged

void QgsQuickCoordinateTransformer::transformContextChanged ( )
signal

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

Property Documentation

◆ destinationCrs

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::destinationCrs
readwrite

Destination CRS.

Definition at line 51 of file qgsquickcoordinatetransformer.h.

◆ projectedPosition

QgsPoint QgsQuickCoordinateTransformer::projectedPosition
read

Projected (destination) position (in destination CRS)

Definition at line 45 of file qgsquickcoordinatetransformer.h.

◆ sourceCrs

QgsCoordinateReferenceSystem QgsQuickCoordinateTransformer::sourceCrs
readwrite

Source CRS, default 4326.

Definition at line 54 of file qgsquickcoordinatetransformer.h.

◆ sourcePosition

QgsPoint QgsQuickCoordinateTransformer::sourcePosition
readwrite

Source position (in source CRS)

Definition at line 48 of file qgsquickcoordinatetransformer.h.

◆ transformContext

QgsCoordinateTransformContext QgsQuickCoordinateTransformer::transformContext
readwrite

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

Definition at line 57 of file qgsquickcoordinatetransformer.h.


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