QGIS API Documentation 3.99.0-Master (21b3aa880ba)
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
24#include <QList>
25#include <QString>
26
28
29#ifndef SIP_RUN
30struct PJconsts;
31typedef struct PJconsts PJ;
32#endif
33
42class CORE_EXPORT QgsDatumTransform
43{
44
45 public:
46
87
93 {
96
98 int epsgCode = 0;
99
102
105
108
111
113 QString remarks;
114
116 QString scope;
117
119 bool preferred = false;
120
122 bool deprecated = false;
123
124 };
125
126
132 {
134 QString shortName;
136 QString fullName;
138 QString packageName;
140 QString url;
142 bool directDownload = false;
144 bool openLicense = false;
146 bool isAvailable = false;
147 };
148
156 {
158 QString scope;
159
161 QString remarks;
162
164 QString areaOfUse;
165
167 QString authority;
168
170 QString code;
171 };
172
180 {
182 QString proj;
184 QString name;
186 double accuracy = 0;
187
194 QString authority;
195
202 QString code;
203
210 QString scope;
211
218 QString remarks;
219
226 bool isAvailable = false;
227
236 QString areaOfUse;
237
243
247 QList< QgsDatumTransform::GridDetails > grids;
248
255 QList< QgsDatumTransform::SingleOperationDetails > operationDetails;
256 };
257
277 static QList< QgsDatumTransform::TransformDetails > operations( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, bool includeSuperseded = false );
278
286 Q_DECL_DEPRECATED static QList< QgsDatumTransform::TransformPair > datumTransformations( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination ) SIP_DEPRECATED;
287
296 Q_DECL_DEPRECATED static QString datumTransformToProj( int datumTransformId ) SIP_DEPRECATED;
297
305 Q_DECL_DEPRECATED static int projStringToDatumTransformId( const QString &string ) SIP_DEPRECATED;
306
316 Q_DECL_DEPRECATED static QgsDatumTransform::TransformInfo datumTransformInfo( int datumTransformId ) SIP_DEPRECATED;
317
318#ifndef SIP_RUN
319
327#endif
328
329 private:
330
331 static void searchDatumTransform( const QString &sql, QList< int > &transforms );
332
333
334};
335
336#endif // QGSDATUMTRANSFORM_H
Represents a coordinate reference system (CRS).
Contains methods and classes relating the datum transformations.
static Q_DECL_DEPRECATED QString datumTransformToProj(int datumTransformId)
Returns a proj string representing the specified datumTransformId datum transform ID.
static QList< QgsDatumTransform::TransformDetails > operations(const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, bool includeSuperseded=false)
Returns a list of coordinate operations available for transforming coordinates from the source to des...
static QgsDatumTransform::TransformDetails transformDetailsFromPj(PJ *op)
Returns the transform details for a Proj coordinate operation op.
static Q_DECL_DEPRECATED QList< QgsDatumTransform::TransformPair > datumTransformations(const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination)
Returns a list of datum transformations which are available for the given source and destination CRS.
static Q_DECL_DEPRECATED int projStringToDatumTransformId(const QString &string)
Returns the datum transform ID corresponding to a specified proj string.
static Q_DECL_DEPRECATED QgsDatumTransform::TransformInfo datumTransformInfo(int datumTransformId)
Returns detailed information about the specified datumTransformId.
A rectangle specified with double values.
#define SIP_DEPRECATED
Definition qgis_sip.h:114
struct PJconsts PJ
Contains information about a projection transformation grid file.
QString shortName
Short name of transform grid.
bool isAvailable
true if grid is currently available for use
QString fullName
Full name of transform grid.
bool directDownload
true if direct download of grid is possible
QString packageName
Name of package the grid is included within.
QString url
Url to download grid from.
bool openLicense
true if grid is available under an open license
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.
double accuracy
Transformation accuracy (in meters).
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.
bool isAvailable
true if operation is available.
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.
int epsgCode
EPSG code for the transform, or 0 if not found in EPSG database.
QString destinationCrsDescription
Destination CRS description.
QString sourceCrsAuthId
Source CRS auth ID.
QString scope
Scope of transform.
QString remarks
Transform remarks.
bool preferred
True if transform is the preferred transform to use for the source/destination CRS combination.
bool deprecated
True if transform is deprecated.
int datumTransformId
Datum transform ID.
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...