17 #ifndef QGSCOORDINATETRANSFORMPRIVATE_H 18 #define QGSCOORDINATETRANSFORMPRIVATE_H 21 #include "qgsconfig.h" 34 #include <QSharedData> 36 #ifndef USE_THREAD_LOCAL 37 #include <QThreadStorage> 44 typedef void *projCtx;
51 class QgsProjContextStore
55 QgsProjContextStore();
56 ~QgsProjContextStore();
58 projCtx
get() {
return context; }
64 class QgsCoordinateTransformPrivate :
public QSharedData
69 explicit QgsCoordinateTransformPrivate();
77 int sourceDatumTransform,
78 int destDatumTransform );
80 QgsCoordinateTransformPrivate(
const QgsCoordinateTransformPrivate &other );
82 ~QgsCoordinateTransformPrivate();
92 QPair< projPJ, projPJ > threadLocalProjData();
98 bool mIsValid =
false;
104 bool mShortCircuit =
false;
112 QString mSourceProjString;
113 QString mDestProjString;
115 int mSourceDatumTransform = -1;
116 int mDestinationDatumTransform = -1;
122 #ifdef USE_THREAD_LOCAL 123 static thread_local QgsProjContextStore mProjContext;
125 static QThreadStorage< QgsProjContextStore * > mProjContext;
128 QReadWriteLock mProjLock;
129 QMap < uintptr_t, QPair< projPJ, projPJ > > mProjProjections;
134 QString stripDatumTransform(
const QString &proj4 )
const;
137 void addNullGridShifts( QString &srcProjString, QString &destProjString,
int sourceDatumTransform,
int destinationDatumTransform )
const;
146 #endif // QGSCOORDINATETRANSFORMPRIVATE_H
Contains information about the context in which a coordinate transform is executed.
This class represents a coordinate reference system (CRS).