QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
georeferencing
qgsgcppoint.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgcppoint.h
3
--------------------------------------
4
Date : February 2022
5
Copyright : (C) 2022 by Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSGCPPOINT_H
17
#define QGSGCPPOINT_H
18
19
#include "qgis_analysis.h"
20
#include "
qgscoordinatereferencesystem.h
"
21
22
class
QgsCoordinateTransformContext
;
23
30
class
ANALYSIS_EXPORT
QgsGcpPoint
31
{
32
public
:
34
enum class
PointType
35
{
36
Source,
37
Destination,
38
};
39
48
QgsGcpPoint
(
const
QgsPointXY
&sourcePoint,
const
QgsPointXY
&destinationPoint,
const
QgsCoordinateReferenceSystem
&destinationPointCrs,
bool
enabled =
true
);
49
57
QgsPointXY
sourcePoint
()
const
{
return
mSourcePoint; }
58
66
void
setSourcePoint
(
QgsPointXY
point ) { mSourcePoint = point; }
67
73
QgsPointXY
destinationPoint
()
const
{
return
mDestinationPoint; }
74
80
void
setDestinationPoint
(
QgsPointXY
point ) { mDestinationPoint = point; }
81
87
QgsCoordinateReferenceSystem
destinationPointCrs()
const
;
88
94
void
setDestinationPointCrs(
const
QgsCoordinateReferenceSystem
&crs );
95
99
QgsPointXY
transformedDestinationPoint(
const
QgsCoordinateReferenceSystem
&targetCrs,
const
QgsCoordinateTransformContext
&context )
const
;
100
106
bool
isEnabled
()
const
{
return
mEnabled; }
107
113
void
setEnabled
(
bool
enabled ) { mEnabled = enabled; }
114
115
// TODO c++20 - replace with = default
116
bool
operator==
(
const
QgsGcpPoint
&other )
const
117
{
118
return
mEnabled == other.mEnabled && mSourcePoint == other.mSourcePoint && mDestinationPoint == other.mDestinationPoint && mDestinationCrs == other.mDestinationCrs;
119
}
120
121
bool
operator!=
(
const
QgsGcpPoint
&other )
const
{
return
!( *
this
== other ); }
122
123
private
:
124
QgsPointXY
mSourcePoint;
125
QgsPointXY
mDestinationPoint;
126
QgsCoordinateReferenceSystem
mDestinationCrs;
127
bool
mEnabled =
true
;
128
};
129
130
#endif
//QGSGCPPOINT_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsGcpPoint
Contains properties of a ground control point (GCP).
Definition
qgsgcppoint.h:31
QgsGcpPoint::PointType
PointType
Coordinate point types.
Definition
qgsgcppoint.h:35
QgsGcpPoint::QgsGcpPoint
QgsGcpPoint(const QgsPointXY &sourcePoint, const QgsPointXY &destinationPoint, const QgsCoordinateReferenceSystem &destinationPointCrs, bool enabled=true)
Constructor for QgsGcpPoint.
Definition
qgsgcppoint.cpp:26
QgsGcpPoint::setSourcePoint
void setSourcePoint(QgsPointXY point)
Sets the source coordinates.
Definition
qgsgcppoint.h:66
QgsGcpPoint::setEnabled
void setEnabled(bool enabled)
Sets whether the point is currently enabled.
Definition
qgsgcppoint.h:113
QgsGcpPoint::operator==
bool operator==(const QgsGcpPoint &other) const
Definition
qgsgcppoint.h:116
QgsGcpPoint::operator!=
bool operator!=(const QgsGcpPoint &other) const
Definition
qgsgcppoint.h:121
QgsGcpPoint::sourcePoint
QgsPointXY sourcePoint() const
Returns the source coordinates.
Definition
qgsgcppoint.h:57
QgsGcpPoint::setDestinationPoint
void setDestinationPoint(QgsPointXY point)
Sets the destination coordinates.
Definition
qgsgcppoint.h:80
QgsGcpPoint::destinationPoint
QgsPointXY destinationPoint() const
Returns the destination coordinates.
Definition
qgsgcppoint.h:73
QgsGcpPoint::isEnabled
bool isEnabled() const
Returns true if the point is currently enabled.
Definition
qgsgcppoint.h:106
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
qgscoordinatereferencesystem.h
Generated on
for QGIS API Documentation by
1.17.0