Mapper  0.9.0
API documentation
Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
OpenOrienteering::Georeferencing Class Reference

A Georeferencing defines a mapping between "map coordinates" (as measured on paper) and coordinates in the real world. More...

#include <georeferencing.h>

Inheritance diagram for OpenOrienteering::Georeferencing:
Inheritance graph
[legend]
Collaboration diagram for OpenOrienteering::Georeferencing:
Collaboration graph
[legend]

Public Types

enum  State { Local = 1, Normal = 2 }
 Georeferencing state. More...
 

Signals

void stateChanged ()
 Indicates a change of the state property. More...
 
void transformationChanged ()
 Indicates a change to the transformation rules between map coordinates and projected coordinates. More...
 
void projectionChanged ()
 Indicates a change to the projection rules between geographic coordinates and projected coordinates. More...
 
void declinationChanged ()
 Indicates a change of the declination. More...
 

Public Member Functions

 Georeferencing ()
 Constructs a scale-only georeferencing. More...
 
 Georeferencing (const Georeferencing &other)
 Constructs a georeferencing which is a copy of an existing georeferencing. More...
 
 ~Georeferencing () override
 Cleans up memory allocated by the georeferencing. More...
 
void save (QXmlStreamWriter &xml) const
 Saves the georeferencing to an XML stream. More...
 
void load (QXmlStreamReader &xml, bool load_scale_only)
 Creates a georeferencing from an XML stream. More...
 
Georeferencingoperator= (const Georeferencing &other)
 Assigns the properties of another Georeferencing to this one. More...
 
bool isValid () const
 Returns if the georeferencing settings are valid. More...
 
bool isLocal () const
 Returns true if this georeferencing is local. More...
 
bool isGeographic () const
 Returns true if the "projected CRS" is actually geographic. More...
 
State getState () const
 Returns the georeferencing state. More...
 
void setState (State value)
 Sets the georeferencing state. More...
 
unsigned int getScaleDenominator () const
 Returns the principal scale denominator. More...
 
void setScaleDenominator (int value)
 Sets the principal scale denominator. More...
 
double getGridScaleFactor () const
 Returns the grid scale factor. More...
 
void setGridScaleFactor (double value)
 Sets the grid scale factor. More...
 
double getDeclination () const
 Returns the magnetic declination (in degrees). More...
 
void setDeclination (double value)
 Sets the magnetic declination (in degrees). More...
 
double getGrivation () const
 Returns the grivation. More...
 
double getGrivationError () const
 Returns the deviation of the grivation from the one given in pre-0.6 files. More...
 
void setGrivation (double value)
 Sets the grivation (in degrees). More...
 
MapCoord getMapRefPoint () const
 Returns the map coordinates of the reference point. More...
 
void setMapRefPoint (const MapCoord &point)
 Defines the map coordinates of the reference point. More...
 
QPointF getProjectedRefPoint () const
 Returns the projected coordinates of the reference point. More...
 
void setProjectedRefPoint (const QPointF &point, bool update_grivation=true)
 Defines the projected coordinates of the reference point. More...
 
QString getProjectedCRSId () const
 Returns the unique id of the projected CRS. More...
 
QString getProjectedCRSName () const
 Returns the name of the coordinate reference system (CRS) of the projected coordinates. More...
 
QString getProjectedCoordinatesName () const
 Returns the name of the projected coordinates. More...
 
const std::vector< QString > & getProjectedCRSParameters () const
 Returns the array of projected crs parameter values. More...
 
QString getProjectedCRSSpec () const
 Returns the specification of the coordinate reference system (CRS) of the projected coordinates. More...
 
bool setProjectedCRS (const QString &id, QString spec, std::vector< QString > params=std::vector< QString >())
 Sets the coordinate reference system (CRS) of the projected coordinates. More...
 
double getConvergence () const
 Calculates the meridian convergence at the reference point. More...
 
LatLon getGeographicRefPoint () const
 Returns the geographic coordinates of the reference point. More...
 
void setGeographicRefPoint (LatLon lat_lon, bool update_grivation=true)
 Defines the geographic coordinates of the reference point. More...
 
QPointF toProjectedCoords (const MapCoord &map_coords) const
 Transforms map (paper) coordinates to projected coordinates. More...
 
QPointF toProjectedCoords (const MapCoordF &map_coords) const
 Transforms map (paper) coordinates to projected coordinates. More...
 
MapCoord toMapCoords (const QPointF &projected_coords) const
 Transforms projected coordinates to map (paper) coordinates. More...
 
MapCoordF toMapCoordF (const QPointF &projected_coords) const
 Transforms projected coordinates to map (paper) coordinates. More...
 
LatLon toGeographicCoords (const MapCoordF &map_coords, bool *ok=0) const
 Transforms map (paper) coordinates to geographic coordinates (lat/lon). More...
 
LatLon toGeographicCoords (const QPointF &projected_coords, bool *ok=0) const
 Transforms CRS coordinates to geographic coordinates (lat/lon). More...
 
QPointF toProjectedCoords (const LatLon &lat_lon, bool *ok=0) const
 Transforms geographic coordinates (lat/lon) to CRS coordinates. More...
 
MapCoord toMapCoords (const LatLon &lat_lon, bool *ok=nullptr) const
 Transforms geographic coordinates (lat/lon) to map coordinates. More...
 
MapCoordF toMapCoordF (const LatLon &lat_lon, bool *ok=nullptr) const
 Transforms geographic coordinates (lat/lon) to map coordinates. More...
 
MapCoordF toMapCoordF (const Georeferencing *other, const MapCoordF &map_coords, bool *ok=nullptr) const
 Transforms map coordinates from the other georeferencing to map coordinates of this georeferencing, if possible. More...
 
QString getErrorText () const
 Returns the current error text. More...
 
void updateTransformation ()
 Updates the transformation parameters between map coordinates and projected coordinates from the current projected reference point coordinates, the grivation and the scale. More...
 
void updateGrivation ()
 Updates the grivation. More...
 
void initDeclination ()
 Initializes the declination. More...
 
void setTransformationDirectly (const QTransform &transform)
 Sets the transformation matrix from map coordinates to projected coordinates directly. More...
 
const QTransformmapToProjected () const
 
const QTransformprojectedToMap () const
 
- Public Member Functions inherited from QObject
virtual const QMetaObjectmetaObject () const const
 
 QObject (QObject *parent)
 
virtual ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
bool blockSignals (bool block)
 
QThreadthread () const const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
const QObjectListchildren () const const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
void dumpObjectTree () const const
 
void dumpObjectInfo () const const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const const
 
QList< QByteArraydynamicPropertyNames () const const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
bool inherits (const char *className) const const
 
void deleteLater ()
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
 Q_CLASSINFO (Name, Value)
 
 Q_INTERFACES (...)
 
 Q_PROPERTY (...)
 
 Q_ENUMS (...)
 
 Q_FLAGS (...)
 
 Q_ENUM (...)
 
 Q_FLAG (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG_NS (...)
 
 Q_OBJECT Q_OBJECT
 
 Q_GADGET Q_GADGET
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SLOTS Q_SLOTS
 
 Q_SLOT Q_SLOT
 
 Q_EMIT Q_EMIT
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 

Static Public Member Functions

static constexpr unsigned int scaleFactorPrecision ()
 Returns the precision of the grid scale factor. More...
 
static double roundScaleFactor (double value)
 Rounds according to the defined precision of the grid scale factor. More...
 
static constexpr unsigned int declinationPrecision ()
 Returns the precision of declination/grivation/convergence. More...
 
static double roundDeclination (double)
 Rounds according to the defined precision of declination/grivation/convergence. More...
 
static double radToDeg (double val)
 Converts a value from radians to degrees. More...
 
static double degToRad (double val)
 Converts a value from degrees to radians. More...
 
static QString degToDMS (double val)
 Converts a value from degrees to a D°M'S" string. More...
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 

Static Public Attributes

static const QString geographic_crs_spec
 A shared PROJ specification of a WGS84 geographic CRS. More...
 

Friends

QDebug operator<< (QDebug dbg, const Georeferencing &georef)
 Dumps a Georeferencing to the debug output. More...
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
QObjectsender () const const
 
int senderSignalIndex () const const
 
int receivers (const char *signal) const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A Georeferencing defines a mapping between "map coordinates" (as measured on paper) and coordinates in the real world.

It provides functions for converting coordinates from one coordinate system to another.

Conversions between map coordinates and "projected coordinates" (flat metric coordinates in a projected coordinate reference system) are made as affine transformation based on the map scale (principal scale), grid scale factor, the grivation and a defined reference point.

Conversions between projected coordinates and geographic coordinates (here: latitude/longitude for the WGS84 datum) are made based on a specification of the coordinate reference system of the projected coordinates. The actual geographic transformation is done by the PROJ library for geographic projections.

If no (valid) specification is given, the projected coordinates are regarded as local coordinates. Local coordinates cannot be converted to other geographic coordinate systems. The georeferencing is "local".

Conversions between "map coordinates" and "geographic coordinates" use the projected coordinates as intermediate step.

Member Enumeration Documentation

◆ State

Georeferencing state.

Enumerator
Local 

Only conversions between map and local projected coordinates are possible.

Normal 

All coordinate conversions are possible (if there is no error in the crs specification).

Constructor & Destructor Documentation

◆ Georeferencing() [1/2]

OpenOrienteering::Georeferencing::Georeferencing ( )

Constructs a scale-only georeferencing.

◆ Georeferencing() [2/2]

OpenOrienteering::Georeferencing::Georeferencing ( const Georeferencing other)

Constructs a georeferencing which is a copy of an existing georeferencing.

Note: Since QObjects may not be copied, this is better understood as creating a new object with the same settings.

◆ ~Georeferencing()

OpenOrienteering::Georeferencing::~Georeferencing ( )
overridedefault

Cleans up memory allocated by the georeferencing.

Member Function Documentation

◆ declinationChanged

void OpenOrienteering::Georeferencing::declinationChanged ( )
signal

Indicates a change of the declination.

The declination has no direct influence on projection or transformation. That's why there is an independent signal.

◆ declinationPrecision()

constexpr unsigned int OpenOrienteering::Georeferencing::declinationPrecision ( )
inlinestatic

Returns the precision of declination/grivation/convergence.

The precision is given in number of decimal places, i.e. digits after the decimal point.

All values set as declination or grivation will be rounded to this precisison.

◆ degToDMS()

QString OpenOrienteering::Georeferencing::degToDMS ( double  val)
static

Converts a value from degrees to a D°M'S" string.

◆ degToRad()

double OpenOrienteering::Georeferencing::degToRad ( double  val)
static

Converts a value from degrees to radians.

◆ getConvergence()

double OpenOrienteering::Georeferencing::getConvergence ( ) const

Calculates the meridian convergence at the reference point.

The meridian convergence is the angle between grid north and true north.

Returns
zero for a local georeferencing, or a calculated approximation

◆ getDeclination()

double OpenOrienteering::Georeferencing::getDeclination ( ) const
inline

Returns the magnetic declination (in degrees).

See also
setDeclination()

◆ getErrorText()

QString OpenOrienteering::Georeferencing::getErrorText ( ) const

Returns the current error text.

◆ getGeographicRefPoint()

LatLon OpenOrienteering::Georeferencing::getGeographicRefPoint ( ) const
inline

Returns the geographic coordinates of the reference point.

◆ getGridScaleFactor()

double OpenOrienteering::Georeferencing::getGridScaleFactor ( ) const
inline

Returns the grid scale factor.

The grid scale factor is the ratio between a length in the grid and the length on the earth model. It is applied as a factor to ground distances to get grid plane distances.

Mapper doesn't explicitly deal with any other factors (elevation factor, unit of measurement). Technically, this property can be used as a combined factor.

◆ getGrivation()

double OpenOrienteering::Georeferencing::getGrivation ( ) const
inline

Returns the grivation.

See also
setGrivation()

◆ getGrivationError()

double OpenOrienteering::Georeferencing::getGrivationError ( ) const
inline

Returns the deviation of the grivation from the one given in pre-0.6 files.

Only valid immediately after loading a georeferencing from a file. Returns 0.0 in any other context.

Files from Mapper versions before 0.6 may have used any number of decimal places for grivation. Since version 0.6, grivation is rounded to the number of decimal places defined by declinationPrecision(). When this rounding takes place (i.e. only when opening a file which has not been saved by 0.6 or later), the difference between the original value and the rounded value is temporarily provided by this function. This value can be used to for correcting dependent data. Any changes to declination or grivation will invalidate this value.

See also
getGrivation()
declinationPrecision()

◆ getMapRefPoint()

MapCoord OpenOrienteering::Georeferencing::getMapRefPoint ( ) const
inline

Returns the map coordinates of the reference point.

◆ getProjectedCoordinatesName()

QString OpenOrienteering::Georeferencing::getProjectedCoordinatesName ( ) const

Returns the name of the projected coordinates.

◆ getProjectedCRSId()

QString OpenOrienteering::Georeferencing::getProjectedCRSId ( ) const
inline

Returns the unique id of the projected CRS.

◆ getProjectedCRSName()

QString OpenOrienteering::Georeferencing::getProjectedCRSName ( ) const

Returns the name of the coordinate reference system (CRS) of the projected coordinates.

◆ getProjectedCRSParameters()

const std::vector< QString > & OpenOrienteering::Georeferencing::getProjectedCRSParameters ( ) const
inline

Returns the array of projected crs parameter values.

◆ getProjectedCRSSpec()

QString OpenOrienteering::Georeferencing::getProjectedCRSSpec ( ) const
inline

Returns the specification of the coordinate reference system (CRS) of the projected coordinates.

Returns
a PROJ specification of the CRS

◆ getProjectedRefPoint()

QPointF OpenOrienteering::Georeferencing::getProjectedRefPoint ( ) const
inline

Returns the projected coordinates of the reference point.

◆ getScaleDenominator()

unsigned int OpenOrienteering::Georeferencing::getScaleDenominator ( ) const
inline

Returns the principal scale denominator.

The principal scale - or representative fraction - is the ratio between units on the printed map and units on ground.

◆ getState()

Georeferencing::State OpenOrienteering::Georeferencing::getState ( ) const
inline

Returns the georeferencing state.

◆ initDeclination()

void OpenOrienteering::Georeferencing::initDeclination ( )

Initializes the declination.

The new value is calculated from the grivation and the convergence. For a local georeferencing, the convergence is zero, and declination is set to the same value as grivation.

◆ isGeographic()

bool OpenOrienteering::Georeferencing::isGeographic ( ) const

Returns true if the "projected CRS" is actually geographic.

See also
proj_angular_output(PJ *, enum PJ_DIRECTION) in PROJ

◆ isLocal()

bool OpenOrienteering::Georeferencing::isLocal ( ) const
inline

Returns true if this georeferencing is local.

A georeferencing is local if no (valid) coordinate system specification is given for the projected coordinates. A local georeferencing cannot convert coordinates from and to geographic coordinate systems.

◆ isValid()

bool OpenOrienteering::Georeferencing::isValid ( ) const
inline

Returns if the georeferencing settings are valid.

This means that coordinates can be converted between map and projected coordinates. isLocal() can be checked to determine if a conversion to geographic coordinates is also possible.

◆ load()

void OpenOrienteering::Georeferencing::load ( QXmlStreamReader xml,
bool  load_scale_only 
)

Creates a georeferencing from an XML stream.

◆ mapToProjected()

const QTransform & OpenOrienteering::Georeferencing::mapToProjected ( ) const

◆ operator=()

Georeferencing & OpenOrienteering::Georeferencing::operator= ( const Georeferencing other)

Assigns the properties of another Georeferencing to this one.

Having this method in a QObject is in contradiction to Qt conventions. But we really need to assign properties from one object to another, where each object maintains its own identity.

◆ projectedToMap()

const QTransform & OpenOrienteering::Georeferencing::projectedToMap ( ) const

◆ projectionChanged

void OpenOrienteering::Georeferencing::projectionChanged ( )
signal

Indicates a change to the projection rules between geographic coordinates and projected coordinates.

◆ radToDeg()

double OpenOrienteering::Georeferencing::radToDeg ( double  val)
static

Converts a value from radians to degrees.

◆ roundDeclination()

double OpenOrienteering::Georeferencing::roundDeclination ( double  value)
inlinestatic

Rounds according to the defined precision of declination/grivation/convergence.

See also
declinationPrecision();

◆ roundScaleFactor()

double OpenOrienteering::Georeferencing::roundScaleFactor ( double  value)
inlinestatic

Rounds according to the defined precision of the grid scale factor.

See also
scaleFactorPrecision();

◆ save()

void OpenOrienteering::Georeferencing::save ( QXmlStreamWriter xml) const

Saves the georeferencing to an XML stream.

◆ scaleFactorPrecision()

constexpr unsigned int OpenOrienteering::Georeferencing::scaleFactorPrecision ( )
inlinestatic

Returns the precision of the grid scale factor.

The precision is given in number of decimal places, i.e. digits after the decimal point.

◆ setDeclination()

void OpenOrienteering::Georeferencing::setDeclination ( double  value)

Sets the magnetic declination (in degrees).

Magnetic declination is the angle between magnetic north and true north. In the context of OpenOrienteering Mapper, it is the angle between the y axis of map coordinates and the latitude axis of geographic coordinates.

This will also affect the grivation value and the transformations.

◆ setGeographicRefPoint()

void OpenOrienteering::Georeferencing::setGeographicRefPoint ( LatLon  lat_lon,
bool  update_grivation = true 
)

Defines the geographic coordinates of the reference point.

This may trigger changes of the projected coordinates of the reference point, the convergence, the grivation and the transformations.

◆ setGridScaleFactor()

void OpenOrienteering::Georeferencing::setGridScaleFactor ( double  value)

Sets the grid scale factor.

See also
getGridScaleFactor()

◆ setGrivation()

void OpenOrienteering::Georeferencing::setGrivation ( double  value)

Sets the grivation (in degrees).

Grivation is the angle between magnetic north and grid north. In the context of OpenOrienteering Mapper, it is the angle between the y axes of map coordinates and projected coordinates.

This will also affect the declination value and the transformations.

◆ setMapRefPoint()

void OpenOrienteering::Georeferencing::setMapRefPoint ( const MapCoord point)

Defines the map coordinates of the reference point.

This will not update the map and geographic coordinates of the reference point.

◆ setProjectedCRS()

bool OpenOrienteering::Georeferencing::setProjectedCRS ( const QString id,
QString  spec,
std::vector< QString params = std::vector<QString>() 
)

Sets the coordinate reference system (CRS) of the projected coordinates.

This will not touch any of the reference points, the declination, the grivation. It is up to the user to decide how to reestablish a valid configuration of geographic reference point, projected reference point, declination and grivation.

Parameters
idan identifier
specthe PROJ specification of the CRS
paramsparameter values (ignore for empty spec)
Returns
true if the specification is valid or empty, false otherwise

◆ setProjectedRefPoint()

void OpenOrienteering::Georeferencing::setProjectedRefPoint ( const QPointF point,
bool  update_grivation = true 
)

Defines the projected coordinates of the reference point.

This may trigger changes of the geographic coordinates of the reference point, the convergence, the grivation and the transformations.

◆ setScaleDenominator()

void OpenOrienteering::Georeferencing::setScaleDenominator ( int  value)

Sets the principal scale denominator.

◆ setState()

void OpenOrienteering::Georeferencing::setState ( Georeferencing::State  value)

Sets the georeferencing state.

This is only necessary to decrease the state to Local, as otherwise it will be automatically changed when setting the respective values.

◆ setTransformationDirectly()

void OpenOrienteering::Georeferencing::setTransformationDirectly ( const QTransform transform)

Sets the transformation matrix from map coordinates to projected coordinates directly.

◆ stateChanged

void OpenOrienteering::Georeferencing::stateChanged ( )
signal

Indicates a change of the state property.

◆ toGeographicCoords() [1/2]

LatLon OpenOrienteering::Georeferencing::toGeographicCoords ( const MapCoordF map_coords,
bool ok = 0 
) const

Transforms map (paper) coordinates to geographic coordinates (lat/lon).

◆ toGeographicCoords() [2/2]

LatLon OpenOrienteering::Georeferencing::toGeographicCoords ( const QPointF projected_coords,
bool ok = 0 
) const

Transforms CRS coordinates to geographic coordinates (lat/lon).

◆ toMapCoordF() [1/3]

MapCoordF OpenOrienteering::Georeferencing::toMapCoordF ( const QPointF projected_coords) const

Transforms projected coordinates to map (paper) coordinates.

◆ toMapCoordF() [2/3]

MapCoordF OpenOrienteering::Georeferencing::toMapCoordF ( const LatLon lat_lon,
bool ok = nullptr 
) const

Transforms geographic coordinates (lat/lon) to map coordinates.

◆ toMapCoordF() [3/3]

MapCoordF OpenOrienteering::Georeferencing::toMapCoordF ( const Georeferencing other,
const MapCoordF map_coords,
bool ok = nullptr 
) const

Transforms map coordinates from the other georeferencing to map coordinates of this georeferencing, if possible.

Todo:
Use direct pipeline instead of intermediate WGS84

◆ toMapCoords() [1/2]

MapCoord OpenOrienteering::Georeferencing::toMapCoords ( const QPointF projected_coords) const

Transforms projected coordinates to map (paper) coordinates.

◆ toMapCoords() [2/2]

MapCoord OpenOrienteering::Georeferencing::toMapCoords ( const LatLon lat_lon,
bool ok = nullptr 
) const

Transforms geographic coordinates (lat/lon) to map coordinates.

◆ toProjectedCoords() [1/3]

QPointF OpenOrienteering::Georeferencing::toProjectedCoords ( const MapCoord map_coords) const

Transforms map (paper) coordinates to projected coordinates.

◆ toProjectedCoords() [2/3]

QPointF OpenOrienteering::Georeferencing::toProjectedCoords ( const MapCoordF map_coords) const

Transforms map (paper) coordinates to projected coordinates.

◆ toProjectedCoords() [3/3]

QPointF OpenOrienteering::Georeferencing::toProjectedCoords ( const LatLon lat_lon,
bool ok = 0 
) const

Transforms geographic coordinates (lat/lon) to CRS coordinates.

◆ transformationChanged

void OpenOrienteering::Georeferencing::transformationChanged ( )
signal

Indicates a change to the transformation rules between map coordinates and projected coordinates.

◆ updateGrivation()

void OpenOrienteering::Georeferencing::updateGrivation ( )

Updates the grivation.

The new value is calculated from the declination and the convergence. For a local georeferencing, the convergence is zero, and grivation is set to the same value as declination.

◆ updateTransformation()

void OpenOrienteering::Georeferencing::updateTransformation ( )

Updates the transformation parameters between map coordinates and projected coordinates from the current projected reference point coordinates, the grivation and the scale.

Friends And Related Function Documentation

◆ operator<<

QDebug operator<< ( QDebug  dbg,
const Georeferencing georef 
)
friend

Dumps a Georeferencing to the debug output.

Note that this requires a reference, not a pointer.

Member Data Documentation

◆ geographic_crs_spec

const QString OpenOrienteering::Georeferencing::geographic_crs_spec
static

A shared PROJ specification of a WGS84 geographic CRS.


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