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();
105 #if PROJ_VERSION_MAJOR>=6 107 bool removeObjectsBelongingToCurrentThread(
void *pj_context );
114 bool mIsValid =
false;
120 bool mShortCircuit =
false;
128 Q_DECL_DEPRECATED QString mSourceProjString;
129 Q_DECL_DEPRECATED QString mDestProjString;
131 Q_DECL_DEPRECATED
int mSourceDatumTransform = -1;
132 Q_DECL_DEPRECATED
int mDestinationDatumTransform = -1;
133 QString mProjCoordinateOperation;
135 #if PROJ_VERSION_MAJOR<6 141 #ifdef USE_THREAD_LOCAL 142 static thread_local QgsProjContextStore mProjContext;
144 static QThreadStorage< QgsProjContextStore * > mProjContext;
149 QReadWriteLock mProjLock;
150 QMap < uintptr_t, ProjData > mProjProjections;
188 const QString &error )> &handler );
203 #if PROJ_VERSION_MAJOR<6 204 Q_DECL_DEPRECATED QString stripDatumTransform(
const QString &proj4 )
const;
208 Q_DECL_DEPRECATED
void addNullGridShifts( QString &srcProjString, QString &destProjString,
int sourceDatumTransform,
int destinationDatumTransform )
const;
224 const QString &error )> sCoordinateOperationCreationErrorHandler;
233 #endif // QGSCOORDINATETRANSFORMPRIVATE_H
Contains information about the context in which a coordinate transform is executed.
This class represents a coordinate reference system (CRS).