17 #ifndef QGSCOORDINATETRANSFORMPRIVATE_H 18 #define QGSCOORDINATETRANSFORMPRIVATE_H 21 #include "qgsconfig.h" 34 #include <QSharedData> 36 #if PROJ_VERSION_MAJOR<6 38 #ifndef USE_THREAD_LOCAL 39 #include <QThreadStorage> 41 typedef QPair< projPJ, projPJ > ProjData;
44 typedef struct PJconsts PJ;
51 #if PROJ_VERSION_MAJOR<6 53 typedef void *projCtx;
60 class QgsProjContextStore
64 QgsProjContextStore();
65 ~QgsProjContextStore();
67 projCtx
get() {
return context; }
75 class QgsCoordinateTransformPrivate :
public QSharedData
80 explicit QgsCoordinateTransformPrivate();
88 int sourceDatumTransform,
89 int destDatumTransform );
91 QgsCoordinateTransformPrivate(
const QgsCoordinateTransformPrivate &other );
93 ~QgsCoordinateTransformPrivate();
103 ProjData threadLocalProjData();
109 bool mIsValid =
false;
115 bool mShortCircuit =
false;
123 Q_DECL_DEPRECATED QString mSourceProjString;
124 Q_DECL_DEPRECATED QString mDestProjString;
126 Q_DECL_DEPRECATED
int mSourceDatumTransform = -1;
127 Q_DECL_DEPRECATED
int mDestinationDatumTransform = -1;
128 QString mProjCoordinateOperation;
130 #if PROJ_VERSION_MAJOR<6 136 #ifdef USE_THREAD_LOCAL 137 static thread_local QgsProjContextStore mProjContext;
139 static QThreadStorage< QgsProjContextStore * > mProjContext;
144 QReadWriteLock mProjLock;
145 QMap < uintptr_t, ProjData > mProjProjections;
183 const QString &error )> &handler );
198 #if PROJ_VERSION_MAJOR<6 199 Q_DECL_DEPRECATED QString stripDatumTransform(
const QString &proj4 )
const;
203 Q_DECL_DEPRECATED
void addNullGridShifts( QString &srcProjString, QString &destProjString,
int sourceDatumTransform,
int destinationDatumTransform )
const;
219 const QString &error )> sCoordinateOperationCreationErrorHandler;
228 #endif // QGSCOORDINATETRANSFORMPRIVATE_H
Contains information about the context in which a coordinate transform is executed.
This class represents a coordinate reference system (CRS).