QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsdatumtransform.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdatumtransform.h
3 ------------------------
4 begin : Dec 2017
5 copyright : (C) 2017 Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17#ifndef QGSDATUMTRANSFORM_H
18#define QGSDATUMTRANSFORM_H
19
20#include "qgis_core.h"
21#include "qgis_sip.h"
22#include "qgsrectangle.h"
23#include <QString>
24#include <QList>
25
27
28#ifndef SIP_RUN
29struct PJconsts;
30typedef struct PJconsts PJ;
31#endif
32
41class CORE_EXPORT QgsDatumTransform
42{
43
44 public:
45
51 {
52
57 TransformPair( int sourceTransformId = -1, int destinationTransformId = -1 )
58 : sourceTransformId( sourceTransformId )
59 , destinationTransformId( destinationTransformId )
60 {}
61
66 int sourceTransformId = -1;
67
72 int destinationTransformId = -1;
73
74 // TODO c++20 - replace with = default
76 {
77 return other.sourceTransformId == sourceTransformId && other.destinationTransformId == destinationTransformId;
78 }
79
81 {
82 return other.sourceTransformId != sourceTransformId || other.destinationTransformId != destinationTransformId;
83 }
84
85 };
86
92 {
94 int datumTransformId = -1;
95
97 int epsgCode = 0;
98
101
104
107
110
112 QString remarks;
113
115 QString scope;
116
118 bool preferred = false;
119
121 bool deprecated = false;
122
123 };
124
125
131 {
133 QString shortName;
135 QString fullName;
137 QString packageName;
139 QString url;
141 bool directDownload = false;
143 bool openLicense = false;
145 bool isAvailable = false;
146 };
147
155 {
157 QString scope;
158
160 QString remarks;
161
163 QString areaOfUse;
164
166 QString authority;
167
169 QString code;
170 };
171
179 {
181 QString proj;
183 QString name;
185 double accuracy = 0;
186
193 QString authority;
194
201 QString code;
202
209 QString scope;
210
217 QString remarks;
218
225 bool isAvailable = false;
226
235 QString areaOfUse;
236
242
246 QList< QgsDatumTransform::GridDetails > grids;
247
254 QList< QgsDatumTransform::SingleOperationDetails > operationDetails;
255 };
256
276 static QList< QgsDatumTransform::TransformDetails > operations( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, bool includeSuperseded = false );
277
285 Q_DECL_DEPRECATED static QList< QgsDatumTransform::TransformPair > datumTransformations( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination ) SIP_DEPRECATED;
286
295 Q_DECL_DEPRECATED static QString datumTransformToProj( int datumTransformId ) SIP_DEPRECATED;
296
304 Q_DECL_DEPRECATED static int projStringToDatumTransformId( const QString &string ) SIP_DEPRECATED;
305
315 Q_DECL_DEPRECATED static QgsDatumTransform::TransformInfo datumTransformInfo( int datumTransformId ) SIP_DEPRECATED;
316
317#ifndef SIP_RUN
318
325 static QgsDatumTransform::TransformDetails transformDetailsFromPj( PJ *op );
326#endif
327
328 private:
329
330 static void searchDatumTransform( const QString &sql, QList< int > &transforms );
331
332
333};
334
335#endif // QGSDATUMTRANSFORM_H
This class represents a coordinate reference system (CRS).
Contains methods and classes relating the datum transformations.
A rectangle specified with double values.
#define SIP_DEPRECATED
Definition qgis_sip.h:106
struct PJconsts PJ
struct PJconsts PJ
Contains information about a projection transformation grid file.
QString shortName
Short name of transform grid.
QString fullName
Full name of transform grid.
QString packageName
Name of package the grid is included within.
QString url
Url to download grid from.
Contains information about a single coordinate operation.
QString authority
Authority name, e.g. EPSG.
QString code
Authority code, e.g. "8447" (for EPSG:8447).
QString remarks
Remarks for operation, from EPSG registry database.
QString areaOfUse
Area of use, from EPSG registry database.
QString scope
Scope of operation, from EPSG registry database.
Contains information about a coordinate transformation operation.
QgsRectangle bounds
Valid bounds for the coordinate operation.
QString name
Display name of transform operation.
QString areaOfUse
Area of use string.
QList< QgsDatumTransform::SingleOperationDetails > operationDetails
Contains information about the single operation steps used in the transform operation.
QString proj
Proj representation of transform operation.
QList< QgsDatumTransform::GridDetails > grids
Contains a list of transform grids used by the operation.
QString scope
Scope of operation, from EPSG registry database.
QString remarks
Remarks for operation, from EPSG registry database.
QString authority
Authority name, e.g.
QString code
Identification code, e.g.
Contains datum transform information.
QString sourceCrsDescription
Source CRS description.
QString destinationCrsAuthId
Destination CRS auth ID.
QString destinationCrsDescription
Destination CRS description.
QString sourceCrsAuthId
Source CRS auth ID.
QString scope
Scope of transform.
QString remarks
Transform remarks.
Contains datum transform information.
bool operator==(QgsDatumTransform::TransformPair other) const
int sourceTransformId
ID for the datum transform to use when projecting from the source CRS.
int destinationTransformId
ID for the datum transform to use when projecting to the destination CRS.
bool operator!=(QgsDatumTransform::TransformPair other) const
TransformPair(int sourceTransformId=-1, int destinationTransformId=-1)
Constructor for a TransformPair with the specified sourceTransformId and destinationTransformId trans...